aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/mpeg12dec: Fix usage of init_get_bits() and use init_get_bits8()Limin Wang2021-10-091-1/+1
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* configure: export pkg-config includedir variableJames Almer2021-10-091-1/+4
| | | | | | | | | | Some packages may not define custom cflags, in which case a simple "pkg-config --cflags" call will return an empty string. This change will be useful to get a valid include path that can be used in library checks. Reviewed-by: Haihao Xiang <haihao.xiang@intel.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/caca: Don't free AVOpt-enabled string manuallyAndreas Rheinhardt2021-10-091-2/+0
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/caca: Make deinit function out of write_trailerAndreas Rheinhardt2021-10-091-11/+6
| | | | | | | Fixes memleaks in case the trailer is never written. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: add audio signal to distortion ratio filterPaul B Mahol2021-10-096-1/+183
|
* avfilter/af_axcorrelate: add DBLP sample format supportPaul B Mahol2021-10-091-116/+150
|
* doc/filters: specify more axcorrelate designPaul B Mahol2021-10-091-1/+1
| | | | | The typical 1D normalized cross-correlation is not same as 1D windowed normalized cross-correlation.
* avdevice/xv: Increase array sizeAndreas Rheinhardt2021-10-091-1/+1
| | | | | | | | | | | | | av_image_copy() expects an array of four pointers according to its declaration; although it currently only touches pointers that are actually in use (depending upon the pixel format) this might change at any time (as has already happened for the linesizes in d7bc52bf456deba0f32d9fe5c288ec441f1ebef5). This fixes ticket #9264 as well as a warning from GCC 11. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_atilt: Constify filterAndreas Rheinhardt2021-10-091-1/+1
| | | | | | | | | (It is actually UB if a declaration and its definition differ wrt their types like they do in this case (the declaration in allfilters is const).) Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/allformats: Fix data race when accessing devices listsAndreas Rheinhardt2021-10-091-11/+11
| | | | | | | | | | | | | | | | | | Up until now setting the input and output devices lists is guarded by a mutex. This prevents data races emanating from multiple concurrent calls to avpriv_register_devices() (triggered by multiple concurrent calls to avdevice_register_all()). Yet reading the lists pointers was done without any lock and with nonatomic variables. This means that there are data races in case of concurrent calls to av_(de)muxer_iterate() and avdevice_register_all() (but only if the iteration in av_(de)muxer_iterate exhausts the non-device (de)muxers). This commit fixes this by putting said pointers into atomic objects. Due to the unavailability of _Atomic the object is an atomic_uintptr, leading to ugly casts. Switching to atomics also allowed to remove the mutex currently used in avpriv_register_devices(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h274: Fix signed left shiftMichael Niedermayer2021-10-091-2/+2
| | | | | | | Fixes: 39463/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5736517629247488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/wavdec: Check smv_block_sizeMichael Niedermayer2021-10-091-0/+2
| | | | | | | | Fixes: Timeout Fixes: 39554/clusterfuzz-testcase-minimized-ffmpeg_dem_WAV_fuzzer-4915221701984256 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: Check for multiple audio_stream_infoMichael Niedermayer2021-10-091-0/+4
| | | | | | | | Fixes: memleak Fixes: 39166/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5153276690038784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_slice: Check idr_pic_idMichael Niedermayer2021-10-091-2/+7
| | | | | | | | Fixes: left shift of negative value -1 Fixes: 39223/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5498831521841152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_axcorrelate: fix integer overflow for huge segmentsPaul B Mahol2021-10-091-2/+2
|
* avfilter/af_axcorrelate: always process all input samplesPaul B Mahol2021-10-091-22/+31
|
* fftools/ffmpeg, ffmpeg_opt: Allocate (In|Out)putStream.pkt earlyAndreas Rheinhardt2021-10-082-15/+9
| | | | | | | Avoids checks lateron in the hot path. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg: Remove unnecessary av_packet_unref()Andreas Rheinhardt2021-10-081-3/+0
| | | | | | | avcodec_receive_packet() already unreferences the packet on its own. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg: Fix crash when flushing non-fully setup output streamAndreas Rheinhardt2021-10-081-0/+3
| | | | | | | | | The output stream's packet may not have been allocated at that point. This happens when quitting in the following command line: $ ./ffmpeg -lavfi abuffer=sample_fmt=u8:sample_rate=48000:channel_layout=stereo -f null - Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/fate-run: Use DEC_OPTS for additional input, tooAndreas Rheinhardt2021-10-081-2/+3
| | | | | | Should fix failures in the cover-art-flac-remux test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avfiltergraph: Fix use-after-free when inserting auto-converterAndreas Rheinhardt2021-10-081-6/+5
| | | | | | | | | | | | | | | | | | | | When inserting an auto-resampler, it may be that the configuration of the filters that the auto-resampler is supposed to connect is already partially merged, i.e. converter->inputs[0].incfg.foo and converter->outputs[0].outcfg.foo (where foo is one of formats, samplerates, channel_layouts) can coincide. Therefore merging the converter filter's input link might modify the outcfg of the converter' outlink. Yet the current code in avfiltergraph.c used pointers from before merging the inlink for merging the outlink, leading to a use-after-free in command lines like: $ ffmpeg -f lavfi -i anullsrc=cl=stereo -lavfi channelsplit,axcorrelate -f null - Fix this by not using outdated values when merging the outlink. This is a regression since 85a6404d7e6c759ddf71d6374812d7ff719728ec. Found-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/img2dec: add GEM Raster image demuxerPeter Ross2021-10-084-2/+28
| | | | Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec: GEM Raster image decoderPeter Ross2021-10-088-1/+357
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Peter Ross <pross@xvid.org>
* avfilter/vf_avgblur_vulkan: fix incorrect conditional judgementWu Jianhua2021-10-081-1/+1
| | | | Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* README: fix typo and description of libavfilterGyan Doshi2021-10-081-1/+1
| | | | Thanks to Arif Driessen for bringing notice to the typo.
* avfilter/vf_showinfo: minor adjustment for the dump format of ROILimin Wang2021-10-081-2/+2
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/hevcdec: set the film grain property if presentLimin Wang2021-10-081-0/+3
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avutil/detection_bbox: Fix av_detection_bbox_alloc failed if nb_bboxes == 0Limin Wang2021-10-081-11/+13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avutil/detection_bbox: use offsetof for bboxes_offsetLimin Wang2021-10-081-2/+3
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/apedec: Use 64bit to avoid overflowMichael Niedermayer2021-10-071-1/+1
| | | | | | | | Fixes: runtime error: signed integer overflow: 727298502 * 3 cannot be represented in type 'int' Fixes: 39172/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-638602483033702 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()Michael Niedermayer2021-10-071-1/+1
| | | | | | | | Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in type 'int' Fixes: 38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5358815017566208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* oavformat/avidec: Check offset in odmlMichael Niedermayer2021-10-071-1/+1
| | | | | | | | Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented in type 'long' Fixes: 38787/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-4859845799444480 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpegts: use actually read packet size in mpegts_resync special caseMichael Niedermayer2021-10-071-2/+2
| | | | | | | | | Fixes: infinite loop Fixes: 37986/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5292311517462528 - Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate/cover-art: Add test for muxing cover arts to FLACAndreas Rheinhardt2021-10-072-0/+120
| | | | | | | | Also covers muxing and demuxing of nonstandard FLAC channel layouts and the multi-dim-quant option of the FLAC encoder (all of which was hitherto uncovered). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flacdec: Also set channels when setting channel_layoutAndreas Rheinhardt2021-10-071-0/+2
| | | | | | | | | This brings the FLAC demuxer in line with all the other demuxers. Furthermore, if it is not done and the FLAC decoder is disabled, the FLAC parser will overwrite the channel layout with the standard channel layout for that number of channels. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/fate-run: Allow multiple inputs for transcode()Andreas Rheinhardt2021-10-071-2/+3
| | | | | | | This allows nicer tests by having a greater range of inputs available (without requiring adding further samples to the fate-suite). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/amr_parser: Treat 0 channels as 1Michael Niedermayer2021-10-071-0/+6
| | | | | | | | | Fixes: division by 0 Fixes: 39562/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-5448834960982016 Fixes: 39589/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMRWB_fuzzer-6119205334810624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/sharpen_npp: use FILTER_SINGLE_PIXFMTTimo Rothenpieler2021-10-071-10/+1
|
* avfilter/af_axcorrelate: fix typoPaul B Mahol2021-10-071-1/+1
|
* avfilter/scale_npp: fix non-aligned output frame dimensionsTimo Rothenpieler2021-10-071-1/+4
|
* avfilter/sharpen_npp: add sharpening video filter with borders controlRoman Arzumanyan2021-10-075-2/+302
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* fate/subtitles: Add scc remux testAndreas Rheinhardt2021-10-072-0/+68
| | | | | | | | | Provides coverage for the muxer. (Thanks to tresh for modifying the whitespace commit hook to allow to push this ref file with tabs.) Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_thumbnail_cuda: Reindent after the previous commitAndreas Rheinhardt2021-10-071-13/+12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_thumbnail_cuda: Fix segfaults on uninitAndreas Rheinhardt2021-10-071-0/+5
| | | | | | | | Uninit crashed if an array containing frames could not be allocated or config_props() has never been called. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/format: Improve const-correctnessAndreas Rheinhardt2021-10-071-3/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/aeval: Fix leak of expressions upon reallocation errorAndreas Rheinhardt2021-10-071-4/+3
| | | | | | | | Fix this by switching to av_dynarray_add_nofree() which is more natural anyway because the entries of the array are pointers. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_vibrato: Fix segfault upon allocation errorAndreas Rheinhardt2021-10-071-1/+1
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_surround: Fix memleaks upon allocation errorAndreas Rheinhardt2021-10-071-2/+2
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_w3fdif: Fix segfault on allocation errorAndreas Rheinhardt2021-10-071-3/+4
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* examples/remuxing: Fix use of uninitialized valueAndreas Rheinhardt2021-10-071-1/+1
| | | | | | | Fixes Coverity ticket 1492326. Regression since 53f374c08d5cc97158c17ea34b1c8ee0116c0578. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>