Commit Graph

94232 Commits

Author SHA1 Message Date
Andreas Rheinhardt 70baf729b5 avformat/matroskadec: Remove non-incremental parsing of clusters
When the new incremental parser was introduced, the old parser was
kept, because the new parser was unable to handle the way SSA packets
are put into Matroska. But since 2014 (since c7d8dbad) this is no
longer needed, so that the old parser can be completely removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-06-22 23:45:41 -03:00
Andreas Rheinhardt e5ec131856 avformat/matroskadec: Use generic size check for signed integers
and drop the redundant checks contained in ebml_read_uint and
ebml_read_sint.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-06-22 23:43:38 -03:00
Andreas Rheinhardt 07d4056052 avformat/matroskadec: Don't copy attached pictures
This commit replaces copying attached pictures by using references to
the already existing buffers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-06-22 23:39:17 -03:00
Bela Bodecs 1beeb3b877 avformat/hlsenc: better checking var_stream_map content
When multiple variant streams are specified by var_stream_map option,
implementation assumes that each elementary stream is assigned only once
to any variant. But this is not checked. This patch makes this checking.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Reviewed-by: Steven Liu<lq@onvideo.cn>
2019-06-22 18:02:42 +08:00
Michael Niedermayer 01d8c72b95 avformat/vividas: reduce keybits to require half the space
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer 8c6c2747bc avformat/vividas: Fix invalid shift in decode_key()
Fixes: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 15118/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5740230004441088

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer 06a90cc783 avformat/jacosubdec: Fix timeres to 1/100 units convertion overflow
Fixes: signed integer overflow: 44444442 * 100 cannot be represented in type 'int'
Fixes: 15117/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5164660531134464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer 54918b5116 avformat/icodec: Free ico->images on error paths
Fixes: 15116/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5715173567889408
Fixes: memleak

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer 112eb17a2b avformat/wsddec: Fix undefined shift
Fixes: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 15123/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5738039235575808

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer 8e3e63e9ac avformat/tiertexseq: Cleanup on error
Fixes: memleak
Fixes: 15122/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5685964636160000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer 902b06f2d4 avformat/tiertexseq: Move seq_read_close() up so it can be used for cleanup
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer 561cc161ca avcodec/fmvc: Check if header fields are available before allocating the image
Fixes: Timeout (15sec -> 0.5sec)
Fixes: 14846/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FMVC_fuzzer-5068322120400896

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Michael Niedermayer dd8720045c avcodec/wcmv: check remaining space vs. blocks
Fixes: Timeout (18sec  -> 7sec)
Fixes: 14835/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WCMV_fuzzer-5646714897170432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-21 18:28:00 +02:00
Derek Buitenhuis d5a6b390ce ffprobe: Fix memory leak
This packet was not necessarily unreferenced.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-06-21 15:40:58 +01:00
Swaraj Hota d70fece560 avformat/ifv: added support for ifv cctv files
Fixes ticket #2956.

Signed-off-by: Swaraj Hota <swarajhota353@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2019-06-21 22:02:14 +10:00
greg Luce 18dab6175b doc/filters: drawtext additions and corrections
Document the pict_type constant. Clarify availability of metadata.
Minor grammar fixes.

Written with the help of Gyan and kepstin
2019-06-21 11:58:50 +05:30
Andreas Rheinhardt a1a8815220 libavcodec: Reduce the size of some arrays
This commit uses smaller types for some static const arrays to reduce
their size in case the entries can be represented in the smaller type.
The biggest savings came from inv_map_table in vp9.c.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-06-20 14:47:46 -03:00
Gyan Doshi 91f5950f83 avformat/segment: fix muxing tmcd tracks in MOV
avformat/movenc still relies on AVCodecContext time_base to mux tmcd
tracks and segment muxer did not copy that field to inner streams
leading to SIGFPE in the child muxer instance.
2019-06-20 18:03:30 +05:30
Bodecs Bela 86f04b918c avformat/hlsenc: enhanced %v handling with variant names
When multiple variant streams are specified by var_stream_map option, %v
placeholder in various names ensures that each variant has its unique
names. Currently %v is substituted by its variant index value (0, 1, 2
etc.). In some use cases it would be handy to specify names for variants
instead of numerical indexes. This patch makes it possible to use names
instead of default indexes. In var_stream_map option each or some of the
variant streams may use an optional name attributum (e.g.
-var_stream_map "v:0,a:0,name:sd v:1,a:1,name:720p") If a name is
specified for a variant, then this name value will be used as
substitution value of %v instead of the default index value.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-06-20 11:08:04 +08:00
Bodecs Bela 09a4853930 av_format/hlsenc: fix %v handling by format_name function
Hi All,

When multiple variant streams are specified by var_stream_map option, %v
placeholder in various names ensures that each variant has its unique
names. Most of %v handlng is done in format_name function. Currently
in this function the result buffer is the same as the
input pattern buffer, so you must allocate it before calling format_name
function. It also means, that it is silently assumed that the result
string will NOT be
longer that the pattern string. It is true most of the time, because %v
may appear only once in the pattern string and number of variant streams
is less than 100 in practical cases. But theoretically it will fail if
specified number of variant streams is greater than 100 (i.e. longer
than 2 digits).
This patch fixes this behaviour by altering format_name function to
allocate the
result buffer and return it to the caller.

Please, review this patch.

best,

Bela
>From 6377ebee8a106a9684d41b270c7d6c8e57cd3e7b Mon Sep 17 00:00:00 2001
From: Bela Bodecs <bodecsb@vivanet.hu>
Date: Mon, 17 Jun 2019 14:31:36 +0200
Subject: [PATCH] av_format/hlsenc: fix %v handling by format_name function

When multiple variant streams are specified by var_stream_map option, %v
placeholder in various names ensures that each variant has its unique
names. Most of %v handlng is done in format_name function. Currently
in this function the result buffer is the same as the input pattern
buffer, so you must allocate it before calling format_name function. It
also means, that it is silently assumed that the result string will NOT
be longer that the pattern string. It is true most of the time, because
%v may appear only once in the pattern string and number of variant
streams is less than 100 in practical cases. But theoretically it will
fail if specified number of variant streams is greater than 100. This
patch fixes this behaviour by altering format_name function to allocate
the result buffer and return it to the caller.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2019-06-19 18:03:33 +08:00
Jun Zhao ebcf4d354f lavfi/af_asetnsamples: Remove the redundant condition check
Redundant condition: '!A || B' is equivalent to '!A || (A && B)' but
more clearly.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-18 23:27:07 +08:00
Gyan Doshi 2fdbeb0b8c avformat/segment: fix increment_tc
inner stream avg_frame_rate wasn't populated, so tc formation failed.

Also, extended increment_tc to cover individual stream timecode.
2019-06-18 18:53:05 +05:30
Limin Wang 268ab17c51 libavcodec/videotoolboxenc: Fix compilation broken on macOS 10.12
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Rick Kern <kernrj@gmail.com>
2019-06-17 22:54:04 -04:00
Gyan Doshi 756dd98120 doc/filters: correct typos in tinterlace flags 2019-06-17 16:55:57 +05:30
Limin Wang 1c3ed11893 doc/filters.texi: Fix the confusing description for find_rect and cover_rect command
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-16 09:56:43 +02:00
Amir Pauker edfced8c04 avutil: add FF_DECODE_ERROR_CONCEALMENT_ACTIVE flag for AVFrame.decode_error_flags
FF_DECODE_ERROR_CONCEALMENT_ACTIVE is set when the decoded frame has error(s) but the returned value from
avcodec_receive_frame is zero i.e. concealed errors

Signed-off-by: Amir Pauker <amir@livelyvideo.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-16 09:56:43 +02:00
Michael Niedermayer 2603f25d32 avcodec/bink: Reorder operations in init to avoid memleak on error
Fixes: Direct leak of 536 byte(s) in 1 object(s)
Fixes: 15266/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-5629530426834944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-16 09:56:43 +02:00
Michael Niedermayer dd357d76e5 avformat/wtvdec: Avoid (32bit signed) sectors
Fixes: left shift of negative value -14614752
Fixes: 15174/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5670543606415360

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Michael Niedermayer a7e3b271fc avcodec/bitstream: Check for more conflicting codes in build_table()
Fixes: out of array read
Fixes: 14563/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5646451545210880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Michael Niedermayer e78b0f8374 avcodec/bitstream: Check for integer code truncation in build_table()
Fixes: out of array read
Fixes: 14563/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5646451545210880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Michael Niedermayer 2a0f23b9d6 avformat/sbgdec: Fixes integer overflow in str_to_time() with hours
Fixes: signed integer overflow: 904444 * 3600 cannot be represented in type 'int'
Fixes: 15113/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5764083346833408

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Michael Niedermayer aa003019ab avformat/vpk: Check offset for validity
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Michael Niedermayer 8c6c4129b4 avformat/vpk: Fix integer overflow in samples_per_block computation
Fixes: signed integer overflow: 84026453 * 28 cannot be represented in type 'int'
Fixes: 15111/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5675630072430592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Michael Niedermayer 6f2625aafc tools/target_dec_fuzzer: Also fuzz extradata
This should improve coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-14 21:36:39 +02:00
Remita Amine bc1749c6e4 lavf/tls_gnutls: retry gnutls_handshake on non fatal errors
fixes #7801

Signed-off-by: Remita Amine <remitamine@gmail.com>
2019-06-14 21:19:41 +03:00
Limin Wang c9c1711f49 libavfilter/vf_blend.c: remove duplicate code with macro-defined function
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-06-14 13:37:45 +02:00
Limin Wang 24321b8751 libavfilter/vf_blend.c: remove duplicate code with same function
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-06-14 13:37:35 +02:00
Steven Liu 665759c3c8 avformat/dashdec: check copy_init_section memory alloc result
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 17:06:40 +08:00
Jun Zhao 6f82bf9dd3 lavf/hls: More log message
More log message, it's will help the debugging

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-14 13:21:38 +08:00
Jun Zhao c432a91d25 doc/fftools-common-opts: document ffmpeg -h bsf=bitstream_filter_name
document ffmpeg -h bsf=bitstream_filter_name

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-14 13:19:26 +08:00
Jun Zhao 6f34fca8a8 doc/formats: document f_strict/strict for AVFormatContext
document f_strict/strict option for AVFormatContext

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-14 13:19:26 +08:00
Jun Zhao c351873e06 lavf/webvtt: fix ffmpeg -h demuxer=webvtt can't dump options
fix ffmpeg -h demuxer=webvtt can't dump options

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-06-14 13:18:32 +08:00
Steven Liu bee0fba7e6 avformat/hls: add http 2.0 version number compare for the http_multiple
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:35 +08:00
Steven Liu 5d0652916f avformat/hls: avformat_find_stream_info when the audio list in the variant
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:29 +08:00
Steven Liu aea524e6e3 avformat/dashdec: add http_proxy, referer and rw_timeout http method support for segments
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:26 +08:00
Steven Liu fa7a6dbd76 avformat/hlsenc: add EXT-X-I-FRAMES-ONLY tag support
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:23 +08:00
Zhong Li 4208b428c4 lavf/qsv_vpp: add frame format option
1. Currently output format is hard-coded as NV12, thus means
   CSC is always done for not NV12 input such as P010.
   Follow original input format as default output.
2. Add an option to specify output format.

Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-06-14 10:27:33 +08:00
Paul B Mahol 6473a5d35c avformat/id3v2enc: fix bug, CTOC flags take only one byte 2019-06-13 23:12:51 +02:00
Matthieu Bouron 7c2c5c4940 avcodec/mediacodecdec: re-indent after previous commit 2019-06-13 11:41:18 +02:00
Matthieu Bouron fef5ba4023 avcodec/mediacodecdec: remove unneeded else block in ff_mediacodec_dec_send() 2019-06-13 11:41:18 +02:00