1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

94794 Commits

Author SHA1 Message Date
Steven Liu
db92a3e463 avformat/hlsenc: fix compiling error of hlsenc 2019-09-06 12:47:15 +08:00
Steven Liu
fe77cad3a4 avformat/hlsenc: fix code style
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-06 12:30:04 +08:00
Steven Liu
07b4bf5f11 avformat/hlsenc: move the warning message from every segment upload to init part
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-06 12:29:56 +08:00
Steven Liu
f267a2ac9c avformat/hlsenc: avformat/hlsenc: reopen new http session for http_persistent
fix ticket: 7975

Tested-by: Ian Klassen <ian@virtualfunc.com>
Suggested-by: Ian Klassen <ian@virtualfunc.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-06 10:26:23 +08:00
Steven Liu
6c593fee63 avformat/http: add ff_http_get_shutdown_status api for check the status of shutdown
this function is used to get the previous shutdown status
when reusing the old connection in block mode.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-09-06 10:26:16 +08:00
Gyan Doshi
2b66c757d6 fate: add test for stream_loop
Checks that seek to start indeed seeks to start.
2019-09-05 23:23:24 +05:30
Gyan Doshi
fa697aa92f ffmpeg: switch to avformat_seek_file for stream_loop
Fixes stream_loop with very short files where seeking is generic index
search
2019-09-05 23:23:11 +05:30
Michael Niedermayer
dfa5d1a366 avcodec/iff: Check for overlap in cmap_read_palette()
Fixes: undefined memcpy() use
Fixes: 16302/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5678750575886336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-05 19:45:53 +02:00
Michael Niedermayer
8a1a9588fb avcodec/vqavideo: Limit resolution
Fixes: Timeout (288sec -> 1ms)
Fixes: 16353/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-5633402606190592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-05 19:45:53 +02:00
Michael Niedermayer
9d3ddef519 avcodec/apedec: Fix 32bit int overflow in do_apply_filter()
Fixes: signed integer overflow: 2147480546 + 4096 cannot be represented in type 'int'
Fixes: 16280/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5123442566758400

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-05 19:45:53 +02:00
Jun Zhao
43b3412631 configure: fix --disable-v4l2-m2m can't work
Use the command ./configure with/without --disable-v4l2-m2m test.

Reviewed-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-05 18:55:09 +08:00
Jun Zhao
da6e569916 configure: fix --disable-alsa can't work
fix --disable-alsa can't work in configure

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-09-05 18:54:53 +08:00
Paul B Mahol
a2dbd85733 doc/filters: fix alphabetic order of some video filters 2019-09-05 11:33:04 +02:00
Aman Gupta
f30fb5ef62 avutil/version: bump for hwcontext_videotoolbox api change
av_map_videotoolbox_format_from_pixfmt2() added in previous
commit to support full-range pixel formats.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-04 12:56:25 -07:00
Akemi
2a9d461abc avcodec/videotoolbox: add support for full range pixel formats
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-04 10:51:20 -07:00
Limin Wang
787c56b9e9 avformat/mxfenc: fix warning: unused function 'klv_ber_length' [-Wunused-function]
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-09-04 18:55:00 +02:00
Guo, Yejun
022f50d3fe libavfilter/dnn: add header into native model file
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-04 11:13:21 -03:00
James Almer
3b3150c45f avformat/matroskadec: use av_fast_realloc to reallocate ebml list arrays
Speeds up the process considerably.

Fixes ticket #8109.

Suggested-by: nevcairiel
Suggested-by: cehoyos
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-04 10:08:17 -03:00
James Almer
f34aabfbae avformat/matroskadec: use proper types for some EbmlSyntax fields
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-04 10:07:13 -03:00
James Almer
a0739e8a16 avcodec/nuv: prevent frame copying when outputting duplicate frames
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-04 10:07:12 -03:00
James Almer
343f8d514e avcodec/wcmv: prevent frame copying when outputting duplicate frames
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-04 10:07:12 -03:00
James Almer
5102999223 Revert "avcodec/wcmv: Avoid copying frames if they are unchanged"
This reverts commit 976dae8b32.

An alternative approach to reduce frame copying will follow.
2019-09-04 10:07:12 -03:00
James Almer
c14a12ac84 avcodec/wcmv: use ff_reget_buffer()
Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-04 10:07:12 -03:00
James Almer
9ea6d2149e avcodec/decode: add a flags parameter to ff_reget_buffer()
Some decoders may not need a writable buffer in some specific cases, but only
a reference to the existing buffer with updated frame properties instead, for
the purpose of returning duplicate frames. For this, the
FF_REGET_BUFFER_FLAG_READONLY flag is added, which will prevent potential
allocations and buffer copies when they are not needed.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-04 10:07:12 -03:00
Anthony Delannoy
39f1295937 avformat/mpegts: Check if ready on SCTE reception
On some DVB stream SCTE-35 data packet are available before the end of
MpegTSContext initialization. We have to check if it is the case to
avoid a SEGFAULT.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-03 21:35:20 +02:00
Aman Gupta
7eb465e185 configure: ensure --enable-omx-rpi uses rpi-specific IL headers
When compiling natively on an RPI where libomxil-bellagio-dev
was also installed, `check_headers OMX_Core.h` succeeded and
the -isystem compiler flag was never added to the build.

For non-native builds, the error message now mentions the
raspberrypi/firmware repository where the RPI specific
headers are available.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-03 10:58:24 -07:00
Aman Gupta
e9cc873636 avcodec/v4l2_m2m: fix minor indentation issue 2019-09-02 15:17:57 -07:00
Aman Gupta
b6c6f56e38 avcodec/v4l2_m2m: use log_ctx variable consistently
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:12:44 -07:00
Aman Gupta
e8c5ce1acb avcodec/v4l2_m2m: log planar mode used by driver
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:12:20 -07:00
Aman Gupta
c95b127733 avcodec/v4l2_context: use EAGAIN to signal when input buffers are unavailable
ENOMEM indicates an allocation failure, and there are no allocations
happening here. The buffers are pre-allocated and there are simply
none available at this time.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:08:34 -07:00
Jorge Ramirez-Ortiz
da45ad48f9 avcodec/v4l2m2m: fix error handling during buffer init
Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:08:34 -07:00
Lukas Rusak
1d36b7b47a avcodec/v4l2_buffers: return int64_t in v4l2_get_pts
v4l2_pts is type int64_t we should return that instead of uint64_t

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:08:29 -07:00
Aman Gupta
bad8365b2b avcodec/v4l2_context: return {decoder,encoder}_cmd errors
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:06:45 -07:00
Aman Gupta
6852b85020 avcodec/v4l2_m2m_enc: fix typo in log message
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:06:38 -07:00
Aman Gupta
dc180cd815 avcodec/v4l2_m2m_enc: log errno on v4l2_set_ext_ctrl failures
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:06:32 -07:00
Aman Gupta
5e2436c6de avcodec/v4l2_buffers: fix minor typos and whitespace
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:06:28 -07:00
Aman Gupta
87daee944b avcodec/v4l2_context: log VIDIOC_REQBUFS failures
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:06:22 -07:00
Aman Gupta
7b092a074b avcodec/v4l2_m2m: remove trailing whitespace in output identifier
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:06:17 -07:00
Aman Gupta
3a5bcb1d13 avcodec/v4l2_m2m: log requested pixel formats
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 15:06:12 -07:00
Andriy Gelman
ef43a4d6b3 avformat: Add ZeroMQ as a protocol
When ffmpeg was streaming, multiple clients were only supported by using a
multicast destination address. An alternative was to stream to a server which
re-distributes the content. This commit adds ZeroMQ as a protocol, which allows
multiple clients to connect to a single ffmpeg instance.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-02 23:08:43 +02:00
Aman Gupta
b022d9ba28 avcodec/omx: fix xFramerate calculation
Integer overflow in the Q16 framerate calculation was sending
invalid values to the OMX encoder.

On the RPI4, this manifested as bitrate controls being ignored
on video streams with 60000/1001 framerates. Video streams with
30000/1001 framerates were not affected.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-09-02 13:46:11 -07:00
Marton Balint
f4eb7d84a7 avformat/mpegtsenc: fix flushing of audio packets
7d097a0fc5 had the same purpose as
3700f655c5 but the former is much simpler, so
let's remove the latter.

Unfortunately both checks were wrong, because in order to make sure DTS > PCR
we have to give us some headroom, so instead of using a dts_difference <
max_delay check let's use a dts_difference < max_delay/2 check.

Fixes DTS < PCR errors with this command line:

./ffmpeg -loglevel verbose -y -f lavfi -i \
  "testsrc=s=64x64:d=20,split=2[out0][tmp1];[tmp1]vflip[out1];sine=d=20,asetnsamples=1000[out2]" \
  -flags +bitexact -fflags +bitexact -sws_flags +accurate_rnd+bitexact  \
  -codec:v libx264 -codec:a mp2 -b:a 32k -pix_fmt yuv420p \
  -map '0✌️0' \
  -map '0✌️1' \
  -map '0🅰️0'  \
  -muxrate 800000 \
  -program st=0:st=2 -program st=1:st=2 -program st=2 -program st=0 -f mpegts out1.ts

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-02 21:44:25 +02:00
Marton Balint
73e0035812 docs/formats: fix max_interleave_delta default
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-02 21:44:25 +02:00
Michael Niedermayer
4778407ab3 avcodec/ralf: fix undefined shift in extend_code()
Fixes: left shift of negative value -3
Fixes: 16147/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5658392722407424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-02 21:37:18 +02:00
Michael Niedermayer
0ee886988e avcodec/ralf: fix undefined shift
Fixes: left shift of negative value -2
Fixes: 16145/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5146671058518016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-02 21:37:18 +02:00
Michael Niedermayer
361b3c873e avcodec/pngdec: Optimize has_trns code
add inner loop specialisations for 2 bpp and 4 bpp
These are all cases for which i found testsamples.

30M cycles -> 5M cycles

Testcase: fate-rgbapng-4816
Testcase: 16097/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5664690889293824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-02 21:37:18 +02:00
Michael Niedermayer
8ae5d2cbb2 vcodec/apedec: Fix integer overflow in filter_3800()
Fixes: signed integer overflow: 2021654528 + 2032575680 cannot be represented in type 'int'
Fixes: 16270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5732438816325632

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-02 21:37:18 +02:00
Michael Niedermayer
64ac8a6e69 avcodec/apedec: Fix integer overflow in filter_fast_3320()
Fixes: signed integer overflow: -1094994793 * 2 cannot be represented in type 'int'
Fixes: 16139/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5663911036059648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-02 21:37:18 +02:00
Pavel Koshevoy
6b57a294a3 lavc/v4l2_m2m: don't close the file descriptor we don't own
ff_v4l2_m2m_create_context initialized V4L2m2mContext.fd to 0
which is a valid file descriptor value. Next ff_v4l2_m2m_codec_init
failed and v4l2_m2m_destroy_context closed file descriptor 0 even
though it didn't belong to V4L2m2mContext.

Signed-off-by: Pavel Koshevoy <pkoshevoy@gmail.com>
2019-09-02 11:28:43 -06:00
Andrey Semashev
7ea2710ec4 configure: Update libmysofa check with a new symbol.
The current code in libavfilter/af_sofalizer.c requires
mysofa_neighborhood_init_withstepdefine function, which only appeared
in libmysofa 0.7. Use this function in configure script to bail out
early if a too old libmysofa is found in the system instead of failing
at compile time.
2019-09-02 19:06:24 +02:00