ffmpeg.git
6 months agoavfilter/af_dynaudnorm: always update delay when flushing
Paul B Mahol [Tue, 30 Apr 2019 08:05:23 +0000 (10:05 +0200)]
avfilter/af_dynaudnorm: always update delay when flushing

6 months agoavfilter/vf_normalize: add timeline support
Paul B Mahol [Mon, 29 Apr 2019 21:28:40 +0000 (23:28 +0200)]
avfilter/vf_normalize: add timeline support

6 months agoavfilter/af_adeclick: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 20:19:15 +0000 (22:19 +0200)]
avfilter/af_adeclick: switch to activate

6 months agoavfilter/af_rubberband: make use of initial input timestamp
Paul B Mahol [Mon, 29 Apr 2019 19:11:46 +0000 (21:11 +0200)]
avfilter/af_rubberband: make use of initial input timestamp

6 months agoavfilter/avf_showwaves: Add draw mode also to showwavespic filter
Martin Vobruba [Fri, 26 Apr 2019 06:17:11 +0000 (08:17 +0200)]
avfilter/avf_showwaves: Add draw mode also to showwavespic filter

See commit a8c2d375ca68b7f001564ced14d8ac0757f53a29

6 months agoavfilter/f_ebur128: use correct type for chl
Paul B Mahol [Mon, 29 Apr 2019 14:46:42 +0000 (16:46 +0200)]
avfilter/f_ebur128: use correct type for chl

6 months agoavfilter/af_dynaudnorm: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 12:53:26 +0000 (14:53 +0200)]
avfilter/af_dynaudnorm: switch to activate

6 months agoavfilter/af_rubberband: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 12:22:13 +0000 (14:22 +0200)]
avfilter/af_rubberband: switch to activate

6 months agoavfilter/af_rubberband: check if rbs is valid
Paul B Mahol [Mon, 29 Apr 2019 11:47:46 +0000 (13:47 +0200)]
avfilter/af_rubberband: check if rbs is valid

6 months agoavfilter/af_sofalizer: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 11:35:04 +0000 (13:35 +0200)]
avfilter/af_sofalizer: switch to activate

6 months agoavfilter/avf_avectorscope: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 10:52:50 +0000 (12:52 +0200)]
avfilter/avf_avectorscope: switch to activate

6 months agoavfilter/avf_ahistogram: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 10:43:18 +0000 (12:43 +0200)]
avfilter/avf_ahistogram: switch to activate

6 months agoavfilter/avf_ahistogram: properly name pads
Paul B Mahol [Mon, 29 Apr 2019 10:28:38 +0000 (12:28 +0200)]
avfilter/avf_ahistogram: properly name pads

6 months agoavfilter/avf_showspectrum: add log scale for frequency plot
Paul B Mahol [Sun, 28 Apr 2019 18:15:17 +0000 (20:15 +0200)]
avfilter/avf_showspectrum: add log scale for frequency plot

6 months agoavfilter/af_astats: fix msvc compile error
Matthias Troffaes [Mon, 29 Apr 2019 09:03:52 +0000 (11:03 +0200)]
avfilter/af_astats: fix msvc compile error

MSVC requires an explicit cast from void * to void when applying the
ternary conditional operator to switch between methods that return
void.

6 months agoavcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bit
James Almer [Wed, 17 Apr 2019 02:00:49 +0000 (23:00 -0300)]
avcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bit

This follows the spec definition, and removes a field from the relevant
structs.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavcodec/cbs_h2645: add macros to read and write fields with no custom range of values
James Almer [Wed, 17 Apr 2019 01:32:05 +0000 (22:32 -0300)]
avcodec/cbs_h2645: add macros to read and write fields with no custom range of values

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavcodec/cbs_av1: add missing value range constrains to timecode Metadata OBU
James Almer [Wed, 17 Apr 2019 04:23:36 +0000 (01:23 -0300)]
avcodec/cbs_av1: add missing value range constrains to timecode Metadata OBU

Also infer the value time_offset_length as 0 when it's not present.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavformat/mxfdec: fix and enhance RIP KLV length checks
Marton Balint [Thu, 4 Apr 2019 21:08:42 +0000 (23:08 +0200)]
avformat/mxfdec: fix and enhance RIP KLV length checks

KLV length is BER encoded (variable size), but the code assumed the encoding to
always use 4 bytes.

Fixes parsing Random Index Pack in samples/MXF/issue2160/PW0805A0V01.4C5B5636.EFA330.mxf.

Signed-off-by: Marton Balint <cus@passwd.hu>
6 months agoavformat/mxfdec: take into account run-in in find_partition_by_offset
Marton Balint [Tue, 2 Apr 2019 23:46:59 +0000 (01:46 +0200)]
avformat/mxfdec: take into account run-in in find_partition_by_offset

Also rename the function to find_partition_by_absolute_offset to make it clear
offset is absolute.

Signed-off-by: Marton Balint <cus@passwd.hu>
6 months agoavformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid
Marton Balint [Sun, 7 Apr 2019 00:27:49 +0000 (02:27 +0200)]
avformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid

This affects the following samples:

samples/ffmpeg-bugs/roundup/issue1775/av_seek_frame_failure.mxf
samples/ffmpeg-bugs/trac/ticket1957/16ch.mxf
samples/ffmpeg-bugs/trac/ticket5016/r0.mxf
samples/ffmpeg-bugs/trac/ticket5016/r1.mxf
samples/ffmpeg-bugs/trac/ticket5316/hq.MXF
samples/ffmpeg-bugs/trac/ticket5316/hqx.MXF

Some AVPacket->pos values are changed because for frame wrapped tracks we point
to the KLV offset and not the data.

Signed-off-by: Marton Balint <cus@passwd.hu>
6 months agoavformat/mxfdec: rework mxf_essence_container_end
Marton Balint [Sun, 7 Apr 2019 00:06:35 +0000 (02:06 +0200)]
avformat/mxfdec: rework mxf_essence_container_end

We find the last essence container much faster if we go through the partitions
backwards...

Signed-off-by: Marton Balint <cus@passwd.hu>
6 months agoavcodec/scpr: avoid using uninitialized value
Paul B Mahol [Sun, 28 Apr 2019 09:06:36 +0000 (11:06 +0200)]
avcodec/scpr: avoid using uninitialized value

Fixes #7872.

6 months agoavfilter/vf_lut3d: increase MAX_LEVEL
Paul B Mahol [Sun, 28 Apr 2019 08:52:21 +0000 (10:52 +0200)]
avfilter/vf_lut3d: increase MAX_LEVEL

6 months agoavfilter/vf_lut3d: fix range domain processing for .cube format
Paul B Mahol [Thu, 25 Apr 2019 12:53:53 +0000 (14:53 +0200)]
avfilter/vf_lut3d: fix range domain processing for .cube format

The ranges are for input, not for output.

6 months agoavcodec/pnm_parser: Remember the length already scanned for ascii images
Michael Niedermayer [Sat, 27 Apr 2019 12:08:07 +0000 (14:08 +0200)]
avcodec/pnm_parser: Remember the length already scanned for ascii images

Fixes: speed regression with xmap_samsung_gear_2560x1280.pgm
Found-by: Michael Koch
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/pnm_parser: Remember the size of the image and do not reparse the header
Michael Niedermayer [Wed, 24 Apr 2019 19:14:19 +0000 (21:14 +0200)]
avcodec/pnm_parser: Remember the size of the image and do not reparse the header

Fixes: Timeout (11sec -> 60ms)
Fixes: 14270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5734809634078720

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>
6 months agoavcodec/scpr3: add missing check for decode_value3() return value
James Almer [Fri, 26 Apr 2019 15:31:19 +0000 (12:31 -0300)]
avcodec/scpr3: add missing check for decode_value3() return value

Fixes ticket #7866.

Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavformat/microdvddec: skip empty lines
Paul B Mahol [Sat, 27 Apr 2019 10:47:39 +0000 (12:47 +0200)]
avformat/microdvddec: skip empty lines

6 months agoavformat/subtitles: ignore extra '\r' at line endings
Paul B Mahol [Thu, 25 Apr 2019 21:21:38 +0000 (23:21 +0200)]
avformat/subtitles: ignore extra '\r' at line endings

6 months agoavcodec/nvenc: fix indentation
Timo Rothenpieler [Wed, 24 Apr 2019 20:47:24 +0000 (22:47 +0200)]
avcodec/nvenc: fix indentation

6 months agoavcodec/nvenc: only unregister input resources when absolutely needed
Timo Rothenpieler [Wed, 24 Apr 2019 17:00:25 +0000 (19:00 +0200)]
avcodec/nvenc: only unregister input resources when absolutely needed

This reverts nvenc to old behaviour, which in some super rare edge cases
performs better.
The implication of this is that any potential API user who relies on
nvenc cleaning up every frames device resources after it's done using
them will have to change their usage pattern.

That should not be a problem, since pretty much every normal usage
pattern automatically implies that surfaces are reused from a common
pool, since constant re-allocation is also very expensive.

6 months agolavf/hls: Remove HLSContext.strict_std_compliance field
Jun Zhao [Tue, 16 Apr 2019 04:54:58 +0000 (12:54 +0800)]
lavf/hls: Remove HLSContext.strict_std_compliance field

After the commit 9f61abc8111, we can use AVFormatContext.strict_std_compliance
instead of HLSContext.strict_std_compliance to avoid the code redundancy.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
6 months agox86/opusdsp: replace loads with shuffles
Lynne [Wed, 24 Apr 2019 11:19:48 +0000 (12:19 +0100)]
x86/opusdsp: replace loads with shuffles

Has a slight speedup.
Can't be carried over to aarch64, since it has no shufps-like instruction.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavfilter: add audio soft clip filter
Paul B Mahol [Tue, 16 Apr 2019 17:55:27 +0000 (19:55 +0200)]
avfilter: add audio soft clip filter

6 months agoavfilter/vf_stack: use time_base from framesync
Paul B Mahol [Thu, 25 Apr 2019 19:14:48 +0000 (21:14 +0200)]
avfilter/vf_stack: use time_base from framesync

Fixes non-monotonous timestamps.

6 months agoavcodec/gdv: Check input palette size before rescale()
Michael Niedermayer [Thu, 25 Apr 2019 17:18:08 +0000 (19:18 +0200)]
avcodec/gdv: Check input palette size before rescale()

Fixes: Timeout (22sec -> 11sec)
Fixes: 13576/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5681024577568768

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>
6 months agoavfilter/af_astats: count number of NaNs/Infs/denormals for floating-point audio too
Paul B Mahol [Mon, 22 Apr 2019 09:47:04 +0000 (11:47 +0200)]
avfilter/af_astats: count number of NaNs/Infs/denormals for floating-point audio too

6 months agolavfi/opencl: add more opencl helper macro
Ruiling Song [Fri, 12 Apr 2019 08:27:54 +0000 (16:27 +0800)]
lavfi/opencl: add more opencl helper macro

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
6 months agoavcodec/jpeg2000dec: Fix return type of get_plt()
Michael Niedermayer [Thu, 25 Apr 2019 16:57:26 +0000 (18:57 +0200)]
avcodec/jpeg2000dec: Fix return type of get_plt()

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/jpeg2000dec: Check PLT data somewhat
Michael Niedermayer [Tue, 16 Apr 2019 13:30:50 +0000 (15:30 +0200)]
avcodec/jpeg2000dec: Check PLT data somewhat

Fixes: Timeout (21sec -> 0.6sec)
Fixes: 14134/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5768371078955008

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/jpeg2000dec: Replace the step_x/y assert by a check in the CPRL case as with...
Michael Niedermayer [Mon, 15 Apr 2019 22:54:09 +0000 (00:54 +0200)]
avcodec/jpeg2000dec: Replace the step_x/y assert by a check in the CPRL case as with the PCRL case

Fixes: assertion failure
Fixes: 14246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5758393601490944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/jpeg2000: Check stepsize before using it
Michael Niedermayer [Mon, 15 Apr 2019 22:41:54 +0000 (00:41 +0200)]
avcodec/jpeg2000: Check stepsize before using it

Fixes: value 1.87633e+10 is outside the range of representable values of type 'int'
Fixes: Undefined behavior
Fixes: 14246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5758393601490944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/qtrle: Check how much of the chunk is available before decoding
Michael Niedermayer [Tue, 2 Apr 2019 00:18:34 +0000 (02:18 +0200)]
avcodec/qtrle: Check how much of the chunk is available before decoding

Fixes: Timeout (10sec -> 2sec)
Fixes: 13979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-5635157718990848

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/aacdec_fixed: Fix undefined shift in noise_scale()
Michael Niedermayer [Fri, 29 Mar 2019 07:58:49 +0000 (08:58 +0100)]
avcodec/aacdec_fixed: Fix undefined shift in noise_scale()

Fixes: 13655/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5120559430500352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/bintext: Add error message when resolution is too small for font.
Nikolas Bowe [Mon, 8 Apr 2019 22:22:10 +0000 (15:22 -0700)]
avcodec/bintext: Add error message when resolution is too small for font.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/zmbv: optimize motion compensation with memcpy()
Michael Niedermayer [Mon, 22 Apr 2019 19:33:55 +0000 (21:33 +0200)]
avcodec/zmbv: optimize motion compensation with memcpy()

Fixes: Timeout (16 sec - 7 sec)
Fixes: 14237/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-5693453897302016

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>
6 months agolavfi/frei0r: Fix a union member type and remove an unneeded cast.
Carl Eugen Hoyos [Tue, 23 Apr 2019 21:09:01 +0000 (23:09 +0200)]
lavfi/frei0r: Fix a union member type and remove an unneeded cast.

6 months agoavcodec/h264_ps: use get_se_golomb_long() to parse some sps fields
James Almer [Wed, 24 Apr 2019 21:29:59 +0000 (18:29 -0300)]
avcodec/h264_ps: use get_se_golomb_long() to parse some sps fields

All three may be up to 32 bits wide.

Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavcodec/h264_ps: fix storage size for offset_for_ref_frame
James Almer [Wed, 10 Apr 2019 18:26:30 +0000 (15:26 -0300)]
avcodec/h264_ps: fix storage size for offset_for_ref_frame

The spec defines the valid range of values to be INT32_MIN + 1 to INT32_MAX, inclusive.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
6 months agoavfilter/af_surround: improve rear channels separation
Paul B Mahol [Wed, 24 Apr 2019 17:12:15 +0000 (19:12 +0200)]
avfilter/af_surround: improve rear channels separation

6 months agoavfilter/af_surround: check for invalid magnitude and phase difference
Paul B Mahol [Wed, 24 Apr 2019 12:36:59 +0000 (14:36 +0200)]
avfilter/af_surround: check for invalid magnitude and phase difference

6 months agoavfilter/af_surround: add angle option
Paul B Mahol [Wed, 24 Apr 2019 11:55:46 +0000 (13:55 +0200)]
avfilter/af_surround: add angle option

6 months agoavfilter/af_surround: fix typo
Paul B Mahol [Wed, 24 Apr 2019 09:23:57 +0000 (11:23 +0200)]
avfilter/af_surround: fix typo

6 months agoavcodec/arbc: Try to correct keyframe/frame type
Michael Niedermayer [Sun, 14 Apr 2019 09:11:42 +0000 (11:11 +0200)]
avcodec/arbc: Try to correct keyframe/frame type

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/arbc: Skip unchanged frames
Michael Niedermayer [Sun, 14 Apr 2019 09:03:06 +0000 (11:03 +0200)]
avcodec/arbc: Skip unchanged frames

Fixes: Timeout (16sec -> 5sec)
Fixes: 14128/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5767365721063424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavutil/avstring: Fix bug and undefined behavior in av_strncasecmp()
Michael Niedermayer [Mon, 15 Apr 2019 22:09:38 +0000 (00:09 +0200)]
avutil/avstring: Fix bug and undefined behavior in av_strncasecmp()

The function in case of n=0 would read more bytes than 0.
The end pointer could be beyond the allocated space, which
is undefined.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavformat/mov: Skip stsd adjustment without chunks
Michael Niedermayer [Tue, 16 Apr 2019 20:15:14 +0000 (22:15 +0200)]
avformat/mov: Skip stsd adjustment without chunks

Fixes: Assertion failure
Fixes: clusterfuzz-testcase-minimized-media_pipeline_integration_fuzzer-5683096400822272

Found-by: Clusterfuzz
Reported-by: Dan Sanders <sandersd@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavformat/aadec: Check for scanf() failure
Michael Niedermayer [Tue, 16 Apr 2019 21:56:43 +0000 (23:56 +0200)]
avformat/aadec: Check for scanf() failure

Fixes: use of uninitialized variables
Fixes: blank.aa

Found-by: Chamal De Silva <chamal.desilva@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/dxtory: Check slice_size against minimum in dxtory_decode_v2()
Michael Niedermayer [Sun, 14 Apr 2019 18:23:24 +0000 (20:23 +0200)]
avcodec/dxtory: Check slice_size against minimum in dxtory_decode_v2()

Fixes: Timeout (33sec -> 16 milli sec)
Fixes: 14181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5681840708386816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/dsicinvideo: check the amount decoded by cin_decode_huffman()
Michael Niedermayer [Mon, 15 Apr 2019 00:01:56 +0000 (02:01 +0200)]
avcodec/dsicinvideo: check the amount decoded by cin_decode_huffman()

Fixes: Timeout (158sec -> 36sec)
Fixes: 14214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-5633569034076160

This is untested with valid cin files as none of the files i found cover the changed
codepath

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/agm: Check that there is available input in read_code()
Michael Niedermayer [Tue, 2 Apr 2019 18:27:13 +0000 (20:27 +0200)]
avcodec/agm: Check that there is available input in read_code()

Fixes: Timeout (46sec -> 7ms)
Fixes: 14030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5721258760601600

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agotests/fate-run: New variable hostexecsuf for local fate tools.
Carl Eugen Hoyos [Fri, 19 Apr 2019 16:04:33 +0000 (18:04 +0200)]
tests/fate-run: New variable hostexecsuf for local fate tools.

Allows running fate in-tree on wsl with msvc.

6 months agocompat/windows/makedef: Allow building shared libs with MSVC under WSL
Cyber Sinh [Fri, 29 Dec 2017 01:59:08 +0000 (02:59 +0100)]
compat/windows/makedef: Allow building shared libs with MSVC under WSL

A similar patch was posted by Gilles Khouzam in his blog.

6 months agoavdevice/alsa: fix indefinite stop on closing PCM capture
Takayuki 'January June' Suwa [Thu, 18 Apr 2019 01:56:40 +0000 (10:56 +0900)]
avdevice/alsa: fix indefinite stop on closing PCM capture

Fixes: https://bugs.archlinux.org/task/58619

Found-by: Elias (Bleuzen) https://bugs.archlinux.org/user/26956
Signed-off-by: Nicolas George <george@nsup.org>
6 months agolibavformat/mov: limit nb_frames_for_fps to INT_MAX
Dan Sanders [Mon, 22 Apr 2019 18:05:00 +0000 (11:05 -0700)]
libavformat/mov: limit nb_frames_for_fps to INT_MAX

It's this or add overflow detection in mov_read_header().

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavfilter/af_surround: export more channel's in/out gains
Paul B Mahol [Tue, 23 Apr 2019 15:48:10 +0000 (17:48 +0200)]
avfilter/af_surround: export more channel's in/out gains

6 months agoavfilter/af_surround: switch to activate
Paul B Mahol [Tue, 23 Apr 2019 10:40:04 +0000 (12:40 +0200)]
avfilter/af_surround: switch to activate

6 months agoavfilter/af_surround: expose window size to user
Paul B Mahol [Tue, 23 Apr 2019 09:52:56 +0000 (11:52 +0200)]
avfilter/af_surround: expose window size to user

6 months agoavfilter/af_surround: add 6.1/6.0 upmix from stereo
Paul B Mahol [Tue, 23 Apr 2019 08:17:58 +0000 (10:17 +0200)]
avfilter/af_surround: add 6.1/6.0 upmix from stereo

6 months agoavcodec/cuviddec: improve progressive frame detection
Sergey Svechnikov [Mon, 22 Apr 2019 17:26:24 +0000 (22:26 +0500)]
avcodec/cuviddec: improve progressive frame detection

There are 2 types of problems when using adaptive deinterlace with cuvid:

1. Sometimes, in the middle of transcoding, cuvid outputs frames with visible horizontal lines (as though weave deinterlace method was chosen);
2. Occasionally, on scene changes, cuvid outputs a wrong frame, which should have been shown several seconds before (as if the frame was assigned some wrong PTS value).

The reason is that sometimes CUVIDPARSERDISPINFO has property progressive_frame equal to 1 with interlaced videos.
In order to fix the problem we should check if the video is interlaced or progressive in the beginning of a video sequence (cuvid_handle_video_sequence).
And then we just use this information instead of the property progressive_frame in CUVIDPARSERDISPINFO (which is unreliable).

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
6 months agoexamples/avio_reading: Use avio_context_free() to free AVIOContext
Jun Zhao [Sun, 21 Apr 2019 02:59:53 +0000 (10:59 +0800)]
examples/avio_reading: Use avio_context_free() to free AVIOContext

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
6 months agoavfilter/af_surround: make channel spread from stereo image user configurable
Paul B Mahol [Mon, 22 Apr 2019 18:44:35 +0000 (20:44 +0200)]
avfilter/af_surround: make channel spread from stereo image user configurable

6 months agoavfilter/af_surround: add lfe_mode option
Paul B Mahol [Mon, 22 Apr 2019 15:11:01 +0000 (17:11 +0200)]
avfilter/af_surround: add lfe_mode option

6 months agoavfilter/af_surround: avoid divisions with very small numbers
Paul B Mahol [Mon, 22 Apr 2019 13:18:58 +0000 (15:18 +0200)]
avfilter/af_surround: avoid divisions with very small numbers

6 months agoavformat/mpegenc - reject unsupported audio streams
Gyan Doshi [Tue, 20 Feb 2018 15:12:21 +0000 (20:42 +0530)]
avformat/mpegenc - reject unsupported audio streams

Only MP1, MP2, MP3, 16-bit PCM_DVD, PCM S16BE,
AC3 and DTS audio codecs are supported by the muxer.

6 months agolavf/oggparsevorbis: Fix change the case of metadata keys issue
Jun Zhao [Sun, 14 Apr 2019 15:22:25 +0000 (23:22 +0800)]
lavf/oggparsevorbis: Fix change the case of metadata keys issue

The spec in https://xiph.org/vorbis/doc/v-comment.html states that
the metadata keys are case-insensitive, so don't change the case
and update the fate test case.

Fix #7784

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
6 months agoavformat/dashenc: Fix a bug with writing "final" manifest
Karthick J [Wed, 17 Apr 2019 05:56:07 +0000 (11:26 +0530)]
avformat/dashenc: Fix a bug with writing "final" manifest

This bug was introduced in the commit 951561b64ee6c11f01daedd9dcf73276cc1e765b

6 months agoavformat/dashdec: add ProgramInformation parser
Steven Liu [Mon, 15 Apr 2019 11:18:30 +0000 (19:18 +0800)]
avformat/dashdec: add ProgramInformation parser

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
6 months agoavcodec/agm: remove ;;
Michael Niedermayer [Sun, 21 Apr 2019 09:05:19 +0000 (11:05 +0200)]
avcodec/agm: remove ;;

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agoavcodec/agm: Check for too many too short codes in make_new_tree()
Michael Niedermayer [Sun, 21 Apr 2019 09:05:18 +0000 (11:05 +0200)]
avcodec/agm: Check for too many too short codes in make_new_tree()

Fixes: SEGV on unknown address
Fixes: 14198/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5723579234123776

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>
6 months agoavcodec/agm: Do not crash on invalid codes
Michael Niedermayer [Sun, 21 Apr 2019 09:05:17 +0000 (11:05 +0200)]
avcodec/agm: Do not crash on invalid codes

I do not know if such vlc trees are allowed in agm, I have no specification
So i do not know if these should be treated as error, or not.
But the code does contain a check for idx < 0 already ...

Fixes: Stack-buffer-overflow in get_tree_codes
Fixes: 14189/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5745747003179008

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>
6 months agoavcodec/ccaption_dec: Add a blank like at the end to avoid rollup reading from outside
Michael Niedermayer [Sat, 20 Apr 2019 16:11:42 +0000 (18:11 +0200)]
avcodec/ccaption_dec: Add a blank like at the end to avoid rollup reading from outside

Fixes: index 20 out of bounds for type 'const char *[4][128]'
Fixes: 14367/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CCAPTION_fuzzer-5718819672162304

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 months agolavfi/avf_showwaves: fix extra gaps at end of waveform
Paul B Mahol [Sun, 21 Apr 2019 19:06:25 +0000 (21:06 +0200)]
lavfi/avf_showwaves: fix extra gaps at end of waveform

Fixes #5931.

6 months agoavcodec/dvdec: add frame threads
Paul B Mahol [Wed, 17 Apr 2019 16:15:51 +0000 (18:15 +0200)]
avcodec/dvdec: add frame threads

6 months agolavfi/frei0r: Fixes the compilation warnings
Jun Zhao [Sun, 21 Apr 2019 04:37:29 +0000 (12:37 +0800)]
lavfi/frei0r: Fixes the compilation warnings

Fixes the compilation warnings

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
6 months agodoc/codecs: mention error returned for flag AV_CODEC_FLAG_DROPCHANGED
Gyan Doshi [Sun, 21 Apr 2019 04:37:17 +0000 (10:07 +0530)]
doc/codecs: mention error returned for flag AV_CODEC_FLAG_DROPCHANGED

6 months agodoc/mailing-list-faq: auto unsubscribe due to DMARC
Lou Logan [Sat, 20 Apr 2019 21:52:44 +0000 (13:52 -0800)]
doc/mailing-list-faq: auto unsubscribe due to DMARC

Signed-off-by: Lou Logan <lou@lrcd.com>
6 months agolavfi: add colorkey_opencl filter
Jarek Samic [Wed, 17 Apr 2019 02:08:49 +0000 (22:08 -0400)]
lavfi: add colorkey_opencl filter

This is a direct port of the CPU filter.

Signed-off-by: Jarek Samic <cldfire3@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
6 months agoavfilter: add lagfun filter
Paul B Mahol [Mon, 15 Apr 2019 20:00:00 +0000 (22:00 +0200)]
avfilter: add lagfun filter

6 months agoavfilter/vf_lut3d: add cineSpace 3D lut support
Paul B Mahol [Fri, 19 Apr 2019 17:44:45 +0000 (19:44 +0200)]
avfilter/vf_lut3d: add cineSpace 3D lut support

6 months agoavfilter/vf_lut3d: add cineSpace 1D lut parsing
Paul B Mahol [Fri, 19 Apr 2019 17:28:02 +0000 (19:28 +0200)]
avfilter/vf_lut3d: add cineSpace 1D lut parsing

6 months agodoc/filters: list values for af_surround window function
Gyan Doshi [Sat, 20 Apr 2019 11:34:54 +0000 (17:04 +0530)]
doc/filters: list values for af_surround window function

6 months agoavfilter/af_surround: allow user to change overlap and win_func
Paul B Mahol [Sat, 20 Apr 2019 10:02:50 +0000 (12:02 +0200)]
avfilter/af_surround: allow user to change overlap and win_func

6 months agodoc/APIchanges: update for 3153a6502a
Gyan Doshi [Sat, 20 Apr 2019 05:17:48 +0000 (10:47 +0530)]
doc/APIchanges: update for 3153a6502a

Entry for added avcodec flag AV_CODEC_FLAG_DROPCHANGED

6 months agoavcodec: add AV_CODEC_FLAG_DROPCHANGED to flags
Gyan Doshi [Sun, 14 Apr 2019 16:42:25 +0000 (22:12 +0530)]
avcodec: add AV_CODEC_FLAG_DROPCHANGED to flags

Discard decoded frames which differ from first decoded frame in stream.

6 months agolavf: bump version/add APIchanges entry when cleanup applehttp
Jun Zhao [Tue, 16 Apr 2019 05:43:53 +0000 (13:43 +0800)]
lavf: bump version/add APIchanges entry when cleanup applehttp

commit abfeba9 "lavf/hls: Cleanup the applehttp" missed
the version bump and APIchanges entry.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
6 months agolavfi/fspp: Simplify a macro.
Carl Eugen Hoyos [Thu, 18 Apr 2019 12:05:21 +0000 (14:05 +0200)]
lavfi/fspp: Simplify a macro.

Silences a warning with clang:
warning: implicit conversion from 'int' to 'int16_t' (aka 'short') changes value from 44130 to -21406

6 months agoconfigure: Add .exe suffix to toolchain calls.
Carl Eugen Hoyos [Fri, 19 Apr 2019 22:12:34 +0000 (00:12 +0200)]
configure: Add .exe suffix to toolchain calls.

Allows in-tree msvc compilation with wsl.

6 months agoavcodec/pictordec: Only recalculate d when y changes in picmemset()
Michael Niedermayer [Fri, 12 Apr 2019 23:19:03 +0000 (01:19 +0200)]
avcodec/pictordec: Only recalculate d when y changes in picmemset()

Fixes: Timeout (21->18sec)
Fixes: 14124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5633887734071296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>