ffmpeg.git
3 months agoavcodec/utils: Check bits_per_coded_sample
Michael Niedermayer [Tue, 18 Jun 2019 21:55:56 +0000 (23:55 +0200)]
avcodec/utils: Check bits_per_coded_sample

This avoids the need for each decoder separately having to handle this case

Fixes: shift exponent -100663046 is negative
Fixes: out of array access
Fixes: 15270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5727829913763840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/videodsp_template: Fix overflow of addition
Michael Niedermayer [Fri, 14 Jun 2019 22:47:06 +0000 (00:47 +0200)]
avcodec/videodsp_template: Fix overflow of addition

Fixes: addition of unsigned offset to 0x7f56fc26a9b6 overflowed to 0x7f56fc26a8be*
Fixes: clusterfuzz-testcase-minimized-mediasource_MP4_AVC1_pipeline_integration_fuzzer-4917949056679936

Reported-by: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/alsdec: Fix invalid shift in multiply()
Michael Niedermayer [Thu, 20 Jun 2019 17:09:11 +0000 (19:09 +0200)]
avcodec/alsdec: Fix invalid shift in multiply()

Fixes: shift exponent -24 is negative
Fixes: 15292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5768533318828032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/4xm: Fix vlc memleak
Michael Niedermayer [Thu, 20 Jun 2019 21:58:47 +0000 (23:58 +0200)]
avcodec/4xm: Fix vlc memleak

Fixes: memleak
Fixes: 15297/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5746203548975104

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/ffwavesynth: Check ts_end - ts_start for overflow
Michael Niedermayer [Sun, 16 Jun 2019 14:12:42 +0000 (16:12 +0200)]
avcodec/ffwavesynth: Check ts_end - ts_start for overflow

Fixes: signed integer overflow: 2314885530818453536 - -8926099139098304480 cannot be represented in type 'long'
Fixes: 15259/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5764366093254656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/vc1dsp: Avoid undefined shifts in vc1_v_s_overlap_c / vc1_h_s_overlap_c
Michael Niedermayer [Sun, 16 Jun 2019 14:17:12 +0000 (16:17 +0200)]
avcodec/vc1dsp: Avoid undefined shifts in vc1_v_s_overlap_c / vc1_h_s_overlap_c

Fixes: left shift of negative value -13
Fixes: 15260/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-5702076048343040

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/tta: Fix undefined shift
Michael Niedermayer [Sun, 16 Jun 2019 13:55:55 +0000 (15:55 +0200)]
avcodec/tta: Fix undefined shift

Fixes: left shift of negative value -4483
Fixes: 15256/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5738691617619968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/qdmc: Fix integer overflows in PRNG
Michael Niedermayer [Sun, 16 Jun 2019 13:53:27 +0000 (15:53 +0200)]
avcodec/qdmc: Fix integer overflows in PRNG

Fixes: signed integer overflow: 214013 * 2531011 cannot be represented in type 'int'
Fixes: 15254/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDMC_fuzzer-5698137026461696

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/rv10: Avoid calculating undefined value that is unused
Michael Niedermayer [Sun, 16 Jun 2019 10:52:30 +0000 (12:52 +0200)]
avcodec/rv10: Avoid calculating undefined value that is unused

Fixes: shift exponent 64 is too large for 32-bit type 'int'
Fixes: 15253/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV10_fuzzer-5671114300194816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/bintext: Check font height
Michael Niedermayer [Sun, 16 Jun 2019 14:01:45 +0000 (16:01 +0200)]
avcodec/bintext: Check font height

Fixes: division by zero
Fixes: 15257/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINTEXT_fuzzer-5757352881422336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/binkdsp: Fix integer overflows in idct
Michael Niedermayer [Tue, 18 Jun 2019 12:28:17 +0000 (14:28 +0200)]
avcodec/binkdsp: Fix integer overflows in idct

Fixes: signed integer overflow: 3784 * 682038 cannot be represented in type 'int'
Fixes: 15265/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-5088311799971840
Fixes: 15268/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-5666502344179712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/bink: Fix integer overflow in unquantize_dct_coeffs()
Michael Niedermayer [Tue, 18 Jun 2019 12:28:17 +0000 (14:28 +0200)]
avcodec/bink: Fix integer overflow in unquantize_dct_coeffs()

Fixes: signed integer overflow: -3447 * 2883584 cannot be represented in type 'int'
Fixes: 15265/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-5088311799971840

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>
3 months agolibavformat/mux: Fix audio_preload
Andreas Rheinhardt [Mon, 24 Jun 2019 21:16:18 +0000 (23:16 +0200)]
libavformat/mux: Fix audio_preload

Commit 31f9032b added the audio_preload feature; its goal is to
interleave audio earlier than the rest. Unfortunately, it has never ever
worked, because the check for whether a packet should be interleaved
before or after another packet was completely wrong: When audio_preload
vanishes, interleave_compare_dts returns 1 if the new packet should be
interleaved earlier than the packet it is compared with and that is what
the rest of the code expects. But the codepath used when audio_preload is
set does the opposite.

Also fixes potential undefined behaviour (namely signed integer
overflow).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/oggparseogm: sync avctx w/ codecpar
Chris Cunningham [Thu, 7 Feb 2019 01:13:03 +0000 (17:13 -0800)]
avformat/oggparseogm: sync avctx w/ codecpar

Codec information may change while reading ogg packets. Update the
stream's internal avctx to match.

3 months agoChangelog: add derain filter into Changelog
Xuewei Meng [Tue, 25 Jun 2019 15:04:23 +0000 (23:04 +0800)]
Changelog: add derain filter into Changelog

3 months agoavcodec/motionpixels: Check for vlc error in mp_get_vlc()
Michael Niedermayer [Sat, 15 Jun 2019 19:08:31 +0000 (21:08 +0200)]
avcodec/motionpixels: Check for vlc error in mp_get_vlc()

Fixes: 15246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5168534407086080
Fixes: runtime error: index -1 out of bounds for type 'HuffCode [16]'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/loco: Limit lossy parameter so it is sane and does not overflow
Michael Niedermayer [Sat, 15 Jun 2019 19:47:16 +0000 (21:47 +0200)]
avcodec/loco: Limit lossy parameter so it is sane and does not overflow

Fixes: 15248/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5087440458481664
Fixes: signed integer overflow: 3 + 2147483647 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mov: Set fragment.found_tfhd only after TFHD has been parsed
Michael Niedermayer [Fri, 14 Jun 2019 22:12:36 +0000 (00:12 +0200)]
avformat/mov: Set fragment.found_tfhd only after TFHD has been parsed

Fixes: Assertion failure
Fixes: crbug971646.mp4

Reported-by: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/img2dec: Fix probe_buffer leak in ff_img_read_header()
Michael Niedermayer [Wed, 12 Jun 2019 19:20:04 +0000 (21:20 +0200)]
avformat/img2dec: Fix probe_buffer leak in ff_img_read_header()

Fixes: memleak
Fixes: 15171/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5683881644130304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/xpmdec: Do not use context dimensions as temporary variables
Michael Niedermayer [Wed, 12 Jun 2019 18:13:34 +0000 (20:13 +0200)]
avcodec/xpmdec: Do not use context dimensions as temporary variables

Fixes: Integer overflow
Fixes: 15134/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XPM_fuzzer-5722635939348480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/vividas: check length in read_vblock()
Michael Niedermayer [Wed, 12 Jun 2019 12:49:11 +0000 (14:49 +0200)]
avformat/vividas: check length in read_vblock()

Fixes: out of array access
Fixes: 15166/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5731062396747776

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/fitsdec: Fix division by 0 in size check
Michael Niedermayer [Thu, 13 Jun 2019 14:08:03 +0000 (16:08 +0200)]
avcodec/fitsdec: Fix division by 0 in size check

Fixes: division by zero
Fixes: 15210/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_fuzzer-5746033243455488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/aacpsdsp_template: Fix integer overflow in ps_hybrid_analysis_c()
Michael Niedermayer [Thu, 13 Jun 2019 13:00:14 +0000 (15:00 +0200)]
avcodec/aacpsdsp_template: Fix integer overflow in ps_hybrid_analysis_c()

Fixes: signed integer overflow: -1539565182 + -798086761 cannot be represented in type 'int'
Fixes: 14807/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-564925382682214

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/truemotion2: Fix integer overflow in last loop in tm2_update_block()
Michael Niedermayer [Thu, 13 Jun 2019 17:45:50 +0000 (19:45 +0200)]
avcodec/truemotion2: Fix integer overflow in last loop in tm2_update_block()

Fixes: signed integer overflow: -1727985666 - 538976288 cannot be represented in type 'int'
Fixes: 15031/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5100228035739648

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/pngdec: Check input space
Michael Niedermayer [Tue, 14 May 2019 18:23:48 +0000 (20:23 +0200)]
avcodec/pngdec: Check input space

Fixes: Timeout (33sec -> 78ms)
Fixes: 14668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LSCR_fuzzer-5767073352908800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/dashenc: split extension for MP4 into .mp4 or .m4s
Alfred E. Heggestad [Mon, 24 Jun 2019 10:50:34 +0000 (12:50 +0200)]
avformat/dashenc: split extension for MP4 into .mp4 or .m4s

3 months agolavf/qsv_scale: add scaling modes support
Zhong Li [Tue, 18 Jun 2019 07:52:29 +0000 (15:52 +0800)]
lavf/qsv_scale: add scaling modes support

low_power mode will use a fixed HW engine (SFC), thus can offload EU usage.
high quality mode will take EU usage (AVS sampler).

Performance and EU usage (Render usage) comparsion on Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz:

High quality mode : ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal_2000frames.h264 \
-vf scale_qsv=w=1280:h=736:mode=hq -f null -
fps=389
RENDER usage: 28.10 (provided by MSDK metrics_monitor)

Low Power mode: ffmpeg -hwaccel qsv -c:v h264_qsv -i ~/bbb_sunflower_1080p_30fps_normal_2000frames.h264 \
-vf scale_qsv=w=1280:h=736:mode=low_power -f null -
fps=343
RENDER usage: 0.00

Low power mode (SFC) may be disabled if not supported by
MSDK/Driver/HW, and replaced by AVS mode interanlly.

Signed-off-by: Zhong Li <zhong.li@intel.com>
3 months agomovsub_bsf: Fix mov2textsub regression
Andreas Rheinhardt [Sun, 23 Jun 2019 04:46:12 +0000 (06:46 +0200)]
movsub_bsf: Fix mov2textsub regression

The mov flavour of timed text uses the first two bytes of the packet as
a length field. And up until 11bef2fe said length field has been read
correctly in the mov2textsub bsf. But since then the next two bytes are
read as if they were the length field. This is fixed in this commit.

Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agolavf/flvenc: add automatic bitstream filtering
Jun Zhao [Sat, 22 Jun 2019 08:50:31 +0000 (16:50 +0800)]
lavf/flvenc: add automatic bitstream filtering

add automatic bitstream filtering when mux AAC

Reported-by: Yabo Wei weiyabogeijing@gmail.com
Reviewed-by: Steven Liu<lq@onvideo.cn>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 months agoavformat/matroskadec: Improve error/EOF checks III
Andreas Rheinhardt [Sun, 23 Jun 2019 23:42:31 +0000 (01:42 +0200)]
avformat/matroskadec: Improve error/EOF checks III

Up until now, when an element was skipped, it was relied upon
ffio_limit to make sure that there is enough data available to skip.
ffio_limit itself relies upon the availability of the file's size. As
this needn't be available, the check has been refined: First one byte
less than intended is skipped, then another byte is read, followed by a
check of the error flags.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskadec: Improve read error/EOF checks II
Andreas Rheinhardt [Sun, 23 Jun 2019 23:42:30 +0000 (01:42 +0200)]
avformat/matroskadec: Improve read error/EOF checks II

This commit fixes a number of bugs:

1. There was no check that no read error/EOF occured during
ebml_read_uint, ebml_read_sint and ebml_read_float.
2. ebml_read_ascii and ebml_read_binary did sometimes not forward
error codes; instead they simply returned AVERROR(EIO).
3. In particular, AVERROR_EOF hasn't been used and no dedicated error
message for it existed. This has been changed.

In order to reduce code duplication, the new error code NEEDS_CHECKING
has been introduced which makes ebml_parse check the AVIOContext's
status for errors.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskadec: Improve read error/EOF checks I
Andreas Rheinhardt [Tue, 25 Jun 2019 01:08:56 +0000 (03:08 +0200)]
avformat/matroskadec: Improve read error/EOF checks I

ebml_read_num had a number of flaws:

1. The check for read errors/EOF was totally wrong. E.g. an EBML number
beginning with the invalid 0x00 would be considered a read error,
although it is just invalid data.
2. The check for read errors/EOF was done just once, after reading the
first byte of the EBML number. But errors/EOF can happen inbetween, of
course, and this wasn't checked.
3. There was no way to distinguish when EOF should be an error (because
the data has to be there) for which an error message should be emitted
and when it is not necessarily an error (namely during parsing of EBML
IDs). Such a possibility has been added and used.

All this was fixed; furthermore, the error messages for invalid EBML
numbers were improved and useless initializations were removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskadec: Properly check return values
Andreas Rheinhardt [Thu, 16 May 2019 22:29:54 +0000 (00:29 +0200)]
avformat/matroskadec: Properly check return values

Up until now, webm_dash_manifest_cues used the return values of
ebml_read_num and ebml_read_length without checking for errors,
i.e. return values < 0. This has been changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoavformat/matroskadec: Don't zero unnecessarily
Andreas Rheinhardt [Thu, 16 May 2019 22:29:48 +0000 (00:29 +0200)]
avformat/matroskadec: Don't zero unnecessarily

It is only necessary to zero the initial allocated memory used to store
the size of laced frames if the block used Xiph lacing. Otherwise no
unintialized data was ever used, so use av_malloc instead of av_mallocz.

Also use the correct type for the allocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agoconfigure: print_in_columns: Replace pr with awk
Alexander Strasser [Sat, 27 Apr 2019 21:15:08 +0000 (23:15 +0200)]
configure: print_in_columns: Replace pr with awk

Get rid of pr dependency and write the columns strictly
alphabetical without page size considerations (POSIX
specifies 66 lines as default).

Setting the page size via pr's -l option was considered,
but as there is issue #5680 which wants to avoid pr
mainly because it's not in busybox, we chose to replace
pr instead.

Before pr would attempt to write pages, thus if a page
boundary was reached, the output looked confusing as one
couldn't see there was a new page and the alphabetical
order was disrupted when scanning down one of the columns.

This change is based on a shell implementation submitted
before by Yejun.

Possible differences to the current version using pr:
1. pr implementations should truncate items to not overflow columns;
   depending on how it's done not truncating shall be better IMHO.
2. pr implementations might balance columns differently;
   we use minimum number of lines and might end up not
   using all columns or might have lesser entries in the
   last column(s)
3. we use spaces only for padding the columns; at least the GNU pr
   version on my system also by default stuffs in tabs in addition
   to a single space in between columns. I don't see that this
   behaviour is demanded by POSIX, though I might be very well
   overlooking things. Anyway for our use case I can't see a need
   for having the additional tabs, or why it would be better compared
   to padding with spaces only.

Fixes output for sizes with width < column width, too.

Fixes remaining part of ticket #5680

Contributor: Guo, Yejun <yejun.guo@intel.com>

3 months agoavformat/hlsenc: better error log message for var_stream_map content
Bela Bodecs [Sat, 22 Jun 2019 13:55:54 +0000 (15:55 +0200)]
avformat/hlsenc: better error log message for var_stream_map content

When multiple variant streams are specified by var_stream_map option,
%v is expected either in the filename or in the last sub-directory name,
but only in one of them. When both of them contains %v string, current
error message only states half of the truth.
And even %v may appears several times inside the last sub-directory name
or in filename pattern.
This patch clarifies this in the log message and in the doc also.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
3 months agoavformat/matroskadec: Treat SimpleBlock as EBML_BIN
Andreas Rheinhardt [Thu, 16 May 2019 22:30:00 +0000 (00:30 +0200)]
avformat/matroskadec: Treat SimpleBlock as EBML_BIN

Up until now, the SimpleBlock was treated specially: It basically had
its own EBML category and it was also included in the BlockGroup EBML
syntax (although a SimpleBlock must not exist in a BlockGroup according
to the Matroska specifications). The latter fact also meant that
a MatroskaBlock's buffer was always unreferenced twice.
This has been changed: The type of a SimpleBlock is now an EBML_BIN.
The only way in which SimpleBlocks are still different is that they
share their associated structure with another unit (namely BlockGroup).
This is also used to unref the block: It is always unreferenced via the
BlockGroup syntax.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 months agolavc/tableprint_vlc: Remove avpriv_request_sample() from included files.
Carl Eugen Hoyos [Wed, 19 Jun 2019 11:41:01 +0000 (13:41 +0200)]
lavc/tableprint_vlc: Remove avpriv_request_sample() from included files.

Fixes compilation with --enable-hardcoded-tables.
Fixes ticket #7962.

4 months agoavcodec/iff: finetune the palette size check in the mask case
Michael Niedermayer [Sat, 22 Jun 2019 19:17:52 +0000 (21:17 +0200)]
avcodec/iff: finetune the palette size check in the mask case

Fixes: out of array access
Fixes: 15381/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5668057826983936

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>
4 months agoavcodec/iff: Fix mask_buf / mask_palbuf leak
Michael Niedermayer [Sat, 22 Jun 2019 18:05:15 +0000 (20:05 +0200)]
avcodec/iff: Fix mask_buf / mask_palbuf leak

Fixes: 15372/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5708881759567872

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>
4 months agoavformat/matroskadec: Don't keep old blocks
Andreas Rheinhardt [Thu, 16 May 2019 22:29:59 +0000 (00:29 +0200)]
avformat/matroskadec: Don't keep old blocks

Before this commit, the Matroska muxer would read a block when required
to do so, parse the block, create and return the necessary AVPackets and
yet keep the blocks (in a dynamically allocated list), although they
aren't used at all any more. This has been changed. There is no list any
more and the block is immediately discarded after parsing.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 months agoavformat/matroskadec: Remove redundant initialization
Andreas Rheinhardt [Thu, 16 May 2019 22:29:53 +0000 (00:29 +0200)]
avformat/matroskadec: Remove redundant initialization

Every new element of an EbmlList is zeroed initially in
ebml_parse_elem, so that in particular a SimpleBlock's duration is
initialized to zero. Therefore it is unnecessary to initialize this
field again (for SimpleBlocks) in matroska_parse_cluster_incremental.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 months agoavformat/matroskadec: Set offset of first cluster
Andreas Rheinhardt [Thu, 16 May 2019 22:29:51 +0000 (00:29 +0200)]
avformat/matroskadec: Set offset of first cluster

By default, the data_offset member of the AVFormatInternal of the
AVFormatContext associated with the MatroskaDemuxContext has not been
initialized explicitly by any Matroska-specific function, so that it was
initialized by default to the offset at the end of matroska_read_header,
i.e. usually to the offset of the length field of the first encountered
cluster. This meant that in case that the Matroska-specific seek-code
fails because there are no index entries for the target track a seek to
data_offset would be performed and ordinary parsing would start from
there which is nonsense: The length field would be treated as EBML ID and
(if the length field is not longer than four bytes (EBML numbers that
long are rejected as invalid EBML IDs)) whatever comes next would be
treated as its EBML size although it simply isn't.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 months agoavformat/matroskadec: Get rid of cluster size field assumption
Andreas Rheinhardt [Thu, 16 May 2019 22:29:49 +0000 (00:29 +0200)]
avformat/matroskadec: Get rid of cluster size field assumption

The earlier code relied on the length of clusters always being coded on
eight bytes as was the behaviour of libavformat's Matroska muxer until
recently. But given that our own Matroska muxer now (and mkvmerge from
time immemorial) creates files that don't conform to this assumption,
it is high time to get rid of this assumption.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 months agoavformat/matroskadec: Remove non-incremental parsing of clusters
Andreas Rheinhardt [Thu, 16 May 2019 22:29:58 +0000 (00:29 +0200)]
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>
4 months agoavformat/matroskadec: Use generic size check for signed integers
Andreas Rheinhardt [Thu, 16 May 2019 22:29:50 +0000 (00:29 +0200)]
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>
4 months agoavformat/matroskadec: Don't copy attached pictures
Andreas Rheinhardt [Thu, 16 May 2019 22:29:52 +0000 (00:29 +0200)]
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>
4 months agoavformat/hlsenc: better checking var_stream_map content
Bela Bodecs [Wed, 19 Jun 2019 08:25:36 +0000 (10:25 +0200)]
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>
4 months agoavformat/vividas: reduce keybits to require half the space
Michael Niedermayer [Fri, 7 Jun 2019 21:22:13 +0000 (23:22 +0200)]
avformat/vividas: reduce keybits to require half the space

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 months agoavformat/vividas: Fix invalid shift in decode_key()
Michael Niedermayer [Fri, 7 Jun 2019 20:56:12 +0000 (22:56 +0200)]
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>
4 months agoavformat/jacosubdec: Fix timeres to 1/100 units convertion overflow
Michael Niedermayer [Fri, 7 Jun 2019 20:43:42 +0000 (22:43 +0200)]
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>
4 months agoavformat/icodec: Free ico->images on error paths
Michael Niedermayer [Sat, 8 Jun 2019 08:48:41 +0000 (10:48 +0200)]
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>
4 months agoavformat/wsddec: Fix undefined shift
Michael Niedermayer [Sat, 8 Jun 2019 07:27:49 +0000 (09:27 +0200)]
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>
4 months agoavformat/tiertexseq: Cleanup on error
Michael Niedermayer [Sat, 8 Jun 2019 07:25:27 +0000 (09:25 +0200)]
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>
4 months agoavformat/tiertexseq: Move seq_read_close() up so it can be used for cleanup
Michael Niedermayer [Sat, 8 Jun 2019 07:24:52 +0000 (09:24 +0200)]
avformat/tiertexseq: Move seq_read_close() up so it can be used for cleanup

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 months agoavcodec/fmvc: Check if header fields are available before allocating the image
Michael Niedermayer [Sun, 2 Jun 2019 21:16:40 +0000 (23:16 +0200)]
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>
4 months agoavcodec/wcmv: check remaining space vs. blocks
Michael Niedermayer [Sat, 1 Jun 2019 22:08:31 +0000 (00:08 +0200)]
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>
4 months agoffprobe: Fix memory leak
Derek Buitenhuis [Fri, 21 Jun 2019 13:34:45 +0000 (14:34 +0100)]
ffprobe: Fix memory leak

This packet was not necessarily unreferenced.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
4 months agoavformat/ifv: added support for ifv cctv files
Swaraj Hota [Mon, 10 Jun 2019 03:55:27 +0000 (09:25 +0530)]
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>
4 months agodoc/filters: drawtext additions and corrections
greg Luce [Thu, 20 Jun 2019 16:08:04 +0000 (12:08 -0400)]
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

4 months agolibavcodec: Reduce the size of some arrays
Andreas Rheinhardt [Wed, 19 Jun 2019 02:39:47 +0000 (04:39 +0200)]
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>
4 months agoavformat/segment: fix muxing tmcd tracks in MOV
Gyan Doshi [Tue, 18 Jun 2019 13:52:16 +0000 (19:22 +0530)]
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.

4 months agoavformat/hlsenc: enhanced %v handling with variant names
Bodecs Bela [Thu, 20 Jun 2019 03:08:04 +0000 (11:08 +0800)]
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>
4 months agoav_format/hlsenc: fix %v handling by format_name function
Bodecs Bela [Mon, 17 Jun 2019 21:05:21 +0000 (23:05 +0200)]
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>
4 months agolavfi/af_asetnsamples: Remove the redundant condition check
Jun Zhao [Sat, 15 Jun 2019 16:22:05 +0000 (00:22 +0800)]
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>
4 months agoavformat/segment: fix increment_tc
Gyan Doshi [Fri, 14 Jun 2019 17:06:27 +0000 (22:36 +0530)]
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.

4 months agolibavcodec/videotoolboxenc: Fix compilation broken on macOS 10.12
Limin Wang [Fri, 7 Jun 2019 15:13:26 +0000 (23:13 +0800)]
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>
4 months agodoc/filters: correct typos in tinterlace flags
Gyan Doshi [Mon, 17 Jun 2019 11:25:57 +0000 (16:55 +0530)]
doc/filters: correct typos in tinterlace flags

4 months agodoc/filters.texi: Fix the confusing description for find_rect and cover_rect command
Limin Wang [Fri, 14 Jun 2019 16:48:24 +0000 (00:48 +0800)]
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>
4 months agoavutil: add FF_DECODE_ERROR_CONCEALMENT_ACTIVE flag for AVFrame.decode_error_flags
Amir Pauker [Fri, 14 Jun 2019 14:35:44 +0000 (07:35 -0700)]
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>
4 months agoavcodec/bink: Reorder operations in init to avoid memleak on error
Michael Niedermayer [Sat, 15 Jun 2019 19:52:24 +0000 (21:52 +0200)]
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>
4 months agoavformat/wtvdec: Avoid (32bit signed) sectors
Michael Niedermayer [Wed, 12 Jun 2019 23:20:19 +0000 (01:20 +0200)]
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>
4 months agoavcodec/bitstream: Check for more conflicting codes in build_table()
Michael Niedermayer [Wed, 5 Jun 2019 10:18:54 +0000 (12:18 +0200)]
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>
4 months agoavcodec/bitstream: Check for integer code truncation in build_table()
Michael Niedermayer [Wed, 5 Jun 2019 10:18:54 +0000 (12:18 +0200)]
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>
4 months agoavformat/sbgdec: Fixes integer overflow in str_to_time() with hours
Michael Niedermayer [Thu, 6 Jun 2019 21:20:49 +0000 (23:20 +0200)]
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>
4 months agoavformat/vpk: Check offset for validity
Michael Niedermayer [Thu, 6 Jun 2019 21:17:18 +0000 (23:17 +0200)]
avformat/vpk: Check offset for validity

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 months agoavformat/vpk: Fix integer overflow in samples_per_block computation
Michael Niedermayer [Thu, 6 Jun 2019 21:14:13 +0000 (23:14 +0200)]
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>
4 months agotools/target_dec_fuzzer: Also fuzz extradata
Michael Niedermayer [Wed, 5 Jun 2019 11:21:59 +0000 (13:21 +0200)]
tools/target_dec_fuzzer: Also fuzz extradata

This should improve coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 months agolavf/tls_gnutls: retry gnutls_handshake on non fatal errors
Remita Amine [Wed, 27 Mar 2019 12:03:07 +0000 (13:03 +0100)]
lavf/tls_gnutls: retry gnutls_handshake on non fatal errors

fixes #7801

Signed-off-by: Remita Amine <remitamine@gmail.com>
4 months agolibavfilter/vf_blend.c: remove duplicate code with macro-defined function
Limin Wang [Tue, 11 Jun 2019 06:46:16 +0000 (14:46 +0800)]
libavfilter/vf_blend.c: remove duplicate code with macro-defined function

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 months agolibavfilter/vf_blend.c: remove duplicate code with same function
Limin Wang [Tue, 11 Jun 2019 06:46:15 +0000 (14:46 +0800)]
libavfilter/vf_blend.c: remove duplicate code with same function

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 months agoavformat/dashdec: check copy_init_section memory alloc result
Steven Liu [Fri, 14 Jun 2019 08:59:07 +0000 (16:59 +0800)]
avformat/dashdec: check copy_init_section memory alloc result

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 months agolavf/hls: More log message
Jun Zhao [Fri, 14 Jun 2019 01:22:04 +0000 (09:22 +0800)]
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>
4 months agodoc/fftools-common-opts: document ffmpeg -h bsf=bitstream_filter_name
Jun Zhao [Sat, 8 Jun 2019 14:52:47 +0000 (22:52 +0800)]
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>
4 months agodoc/formats: document f_strict/strict for AVFormatContext
Jun Zhao [Sat, 8 Jun 2019 12:07:44 +0000 (20:07 +0800)]
doc/formats: document f_strict/strict for AVFormatContext

document f_strict/strict option for AVFormatContext

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 months agolavf/webvtt: fix ffmpeg -h demuxer=webvtt can't dump options
Jun Zhao [Tue, 4 Jun 2019 02:54:45 +0000 (10:54 +0800)]
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>
4 months agoavformat/hls: add http 2.0 version number compare for the http_multiple
Steven Liu [Tue, 4 Jun 2019 07:58:35 +0000 (15:58 +0800)]
avformat/hls: add http 2.0 version number compare for the http_multiple

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 months agoavformat/hls: avformat_find_stream_info when the audio list in the variant
Steven Liu [Tue, 4 Jun 2019 07:27:11 +0000 (15:27 +0800)]
avformat/hls: avformat_find_stream_info when the audio list in the variant

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 months agoavformat/dashdec: add http_proxy, referer and rw_timeout http method support for...
Steven Liu [Mon, 3 Jun 2019 09:03:41 +0000 (17:03 +0800)]
avformat/dashdec: add http_proxy, referer and rw_timeout http method support for segments

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 months agoavformat/hlsenc: add EXT-X-I-FRAMES-ONLY tag support
Steven Liu [Sun, 2 Jun 2019 14:03:17 +0000 (22:03 +0800)]
avformat/hlsenc: add EXT-X-I-FRAMES-ONLY tag support

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 months agolavf/qsv_vpp: add frame format option
Zhong Li [Fri, 31 May 2019 00:44:47 +0000 (08:44 +0800)]
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>
4 months agoavformat/id3v2enc: fix bug, CTOC flags take only one byte
Paul B Mahol [Thu, 13 Jun 2019 21:11:10 +0000 (23:11 +0200)]
avformat/id3v2enc: fix bug, CTOC flags take only one byte

4 months agoavcodec/mediacodecdec: re-indent after previous commit
Matthieu Bouron [Wed, 24 Apr 2019 07:59:30 +0000 (09:59 +0200)]
avcodec/mediacodecdec: re-indent after previous commit

4 months agoavcodec/mediacodecdec: remove unneeded else block in ff_mediacodec_dec_send()
Matthieu Bouron [Wed, 24 Apr 2019 07:59:29 +0000 (09:59 +0200)]
avcodec/mediacodecdec: remove unneeded else block in ff_mediacodec_dec_send()

4 months agoavcodec/mediacodecdec: try to receive a frame after signaling EOF to the codec
Matthieu Bouron [Wed, 24 Apr 2019 07:59:28 +0000 (09:59 +0200)]
avcodec/mediacodecdec: try to receive a frame after signaling EOF to the codec

Avoids returning EAGAIN after signaling EOF to the codec in
ff_mediacodec_dec_send() so we can try to receive a frame before
returning in mediacodec_receive_frame().

This helps avoiding an extra round-trip between avcodec_send_frame() and
avcodec_receive_frame() while draining the remaining frames.

4 months agoavcodec/omx: Correct av_log() log message
Alejandro Solozabal [Wed, 12 Jun 2019 12:16:25 +0000 (12:16 +0000)]
avcodec/omx: Correct av_log() log message

Print the right library name, which is trying to open, on the log message.

Signed-off-by: Alejandro Solozabal <a.solozabal@hotmail.com>
4 months agovaapi_encode_mjpeg: fix bad component id bug
U. Artie Eoff [Fri, 7 Jun 2019 21:45:33 +0000 (14:45 -0700)]
vaapi_encode_mjpeg: fix bad component id bug

The compound literals assigned to "components"
only exist within the scope of the if/else
block (thanks Mark Thompson for the better
explanation).

Thus, after this if/else block, "components"
ends up pointing to an arbitrary/undefined
array.  With some compilers and depending on
optimization settings, these arbitrary values
may end up being the same value (i.e. 0 with
GNU GCC 9.x).  Unfortunately, the GNU GCC
compiler, at least, never prints any warnings
about this.

This patch fixes this issue by assigning the
constant arrays to local variables at function
scope and then pointing "components" to those
as necessary.

Fixes #7915

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
4 months agoavfilter/vf_gblur: add missing preprocessor check
James Almer [Wed, 12 Jun 2019 13:54:59 +0000 (10:54 -0300)]
avfilter/vf_gblur: add missing preprocessor check

Fixes compilation on x86_32

Signed-off-by: James Almer <jamrial@gmail.com>
4 months agoconfigure: add missing dnn dependency to derain filter
James Almer [Wed, 12 Jun 2019 13:27:35 +0000 (10:27 -0300)]
configure: add missing dnn dependency to derain filter

Signed-off-by: James Almer <jamrial@gmail.com>
4 months agofate: add VP4 test
Peter Ross [Tue, 14 May 2019 13:25:50 +0000 (23:25 +1000)]
fate: add VP4 test