summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* avformat/cafenc: Don't segfault upon allocation errorAndreas Rheinhardt2021-09-271-13/+10
| | | | | | | | | | | | | | | | | | | If an array for the packet sizes could not be successfully reallocated when writing a packet, the CAF muxer frees said array, but does not reset the number of valid bytes. As a result, when the trailer is written later, avio_write tries to read that many bytes from NULL, which segfaults. Fix this by not freeing the array in case of error; also, postpone writing the packet data after having successfully (re)allocated the array, so that even on allocation error the file can be correctly finalized. Also remove an unnecessary resetting of the number of size entries used at the end. Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/cafenc: Fix potential integer overflowAndreas Rheinhardt2021-09-271-2/+2
| | | | | | | (As long as avio_write() only accepts an int, it makes no sense to try to support sizes that don't fit into an int.) Signed-off-by: Andreas Rheinhardt <[email protected]>
* fate/caf: Add remux testsAndreas Rheinhardt2021-09-277-1/+153
| | | | | | These test both the muxer as well as the demuxer. Signed-off-by: Andreas Rheinhardt <[email protected]>
* fate/demux: Move caf test to its own fileAndreas Rheinhardt2021-09-274-3/+6
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avfilter/audio, video: Remove references to avfilter_unref_buffer()Andreas Rheinhardt2021-09-272-4/+2
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/filmstripenc: Simplify writing reserved elementsAndreas Rheinhardt2021-09-271-3/+2
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/chromaprint: Improve returned error codesAndreas Rheinhardt2021-09-271-10/+8
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/chromaprint: Add deinit functionAndreas Rheinhardt2021-09-271-3/+4
| | | | | | Fixes memleaks in case the trailer is never written. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avutil/tests/opt: Set AVClass.versionAndreas Rheinhardt2021-09-271-0/+1
| | | | | Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avutil/opt: Remove outdated version checkAndreas Rheinhardt2021-09-271-4/+1
| | | | | Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avfilter/vf_blend: add softdifference blend modePaul B Mahol2021-09-263-0/+10
|
* avfilter/vf_colorchannelmixer: add extended preserve color supportPaul B Mahol2021-09-262-84/+94
|
* avfilter/vf_colorchannelmixer: simplify code a littlePaul B Mahol2021-09-261-16/+4
|
* avfilter/vf_colorlevels: add preserve color optionPaul B Mahol2021-09-263-11/+166
|
* avfilter/vf_colorlevels: refactor code so all components are processed in ↵Paul B Mahol2021-09-261-41/+59
| | | | | | same loop This is also faster.
* avfilter/elbg: Extend filter to include alpha values in the quantization ↵Soft Works2021-09-262-9/+20
| | | | | | | | | | | procedure Usage example: ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" -filter_complex "elbg=pal8=1:use_alpha=1" -frames:v 1 out.png Signed-off-by: softworkz <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/apedec: Fix integer overflow in filter_fast_3320()Michael Niedermayer2021-09-261-1/+1
| | | | | | | | Fixes: signed integer overflow: 2145649668 + 3956526 cannot be represented in type 'int' Fixes: 38351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-4647077926273024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* tools/target_dec_fuzzer: Adjust threshold for WMV2Michael Niedermayer2021-09-261-0/+1
| | | | | | | | Fixes: Timeout Fixes: 37737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-4923012999151616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mov: Fix last mfra checkMichael Niedermayer2021-09-261-2/+2
| | | | | | | | Fixes: signed integer overflow: 9223372036854775360 + 536870912 cannot be represented in type 'long' Fixes: 37940/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6095637855207424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/mxpegdec: Check for AVDISCARD_ALLMichael Niedermayer2021-09-261-0/+3
| | | | | | | | | | | Fixes: Fixes NULL pointer dereference Fixes: 36610/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6052641783283712 Fixes: 37907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-4725170850365440 Fixes: 37904/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6367889262247936 Fixes: 38085/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-5175270823297024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/h274: fix bad left shiftsMichael Niedermayer2021-09-261-2/+2
| | | | | | | | Fixes: left shift of negative value -3 Fixes: 37788/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6024714540154880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/flicvideo: Check remaining bytes in FLI*COPYMichael Niedermayer2021-09-261-0/+2
| | | | | | | | Fixes: Timeout Fixes: 37795/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-4846536543043584 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/utils: ARGO writes 4x4 blocks without regard to the image dimensionsMichael Niedermayer2021-09-261-0/+6
| | | | | | | | Fixes: out of array access Fixes: 37197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5877046382297088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* swscale: add input/output support for X2BGR10LEManuel Stoeckl2021-09-2616-6/+40
| | | | | Signed-off-by: Manuel Stoeckl <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* lavu/pix_fmt: add pixel format for x2bgr10Manuel Stoeckl2021-09-266-1/+44
| | | | | | | | | | | The new format (given in big/little endian forms) matches the existing X2RGB10 format, except with B and R channels switched. AV_PIX_FMT_X2BGR10 data often is created by OpenGL programs whose buffers use the GL_RGB10 internal format. Signed-off-by: Manuel Stoeckl <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* swscale/yuv2rgb: fix conversion to X2RGB10Manuel Stoeckl2021-09-2613-13/+13
| | | | | | | | | This resolves a problem where conversions from YUV to X2RGB10LE would produce color values a factor 4 too small, because an 8-bit value was placed in a 10-bit channel. Signed-off-by: Manuel Stoeckl <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/internal: Update AVCodecInternal.is_copy documentationAndreas Rheinhardt2021-09-261-4/+2
| | | | | | Forgotten in 1f4cf92cfbd3accbae582ac63126ed5570ddfd37. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/avcodec: Simplify check for flushing of bsfAndreas Rheinhardt2021-09-261-1/+1
| | | | | | | Just check for the existence of the bsf. This is equivalent to the old criterion of the AVCodecContext being a decoder. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/avcodec: Remove redundant assertAndreas Rheinhardt2021-09-261-3/+0
| | | | | | | | It is now checked by FATE that no encoder capable of flushing uses frame threads, so this now redundant runtime check can be removed. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/tests/avcodec: Check codec caps for consistencyAndreas Rheinhardt2021-09-261-0/+38
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/avcodec: Make sanity check stricterAndreas Rheinhardt2021-09-261-2/+1
| | | | | | | | | | | | | If an AVCodec has a private class, its priv_data_size must be > 0 and at the end of a successful call to avcodec_open2() the AVCodecContext's priv_data must exist and its first element must be a pointer to said AVClass. This should not be conditional on priv_data_size being > 0 (which is tested by FATE) or on the private context having been successfully allocated (which has to have happened at that point). So remove these preconditions to make the test stricter. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/tests/avcodec: Sanity check AVCodec.priv_data_sizeAndreas Rheinhardt2021-09-261-0/+23
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/j2kenc: Fix AV_OPT_TYPE_CONST offsetsAndreas Rheinhardt2021-09-261-5/+5
| | | | | | They are supposed to be zero. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/tests/avcodec: Check consistency of function pointersAndreas Rheinhardt2021-09-261-1/+22
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/tests/avcodec: Test AVCodec and AVCodecDescriptor consistencyAndreas Rheinhardt2021-09-261-1/+10
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/tests/avcodec: Add basic sanity checks for AVCodec propertiesAndreas Rheinhardt2021-09-261-0/+36
| | | | | Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/tests/utils: Rename to avcodecAndreas Rheinhardt2021-09-263-6/+6
| | | | | | | The current name comes from a time in which libavcodec/utils.c contained the whole core of libavcodec. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avfilter/formats: Avoid reallocations for video in ff_all_formats()Andreas Rheinhardt2021-09-261-5/+1
| | | | | | | | | | | | | Up until now, the list of pixfmts is reallocated every time an entry is added to it; there are currently 196 pixel formats, so this matters: It causes 5541704 calls to av_realloc_array() in a typical FATE run, which is the majority for said function (8095768 calls) and even a large chunk of the calls to av_realloc() itself (12589508 calls). Fix this by using ff_formats_pixdesc_filter() instead. Reviewed-by: Nicolas George <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avfilter/formats: Make ff_formats_pixdesc_filter return AVFilterFormats*Andreas Rheinhardt2021-09-2614-106/+46
| | | | | | | | | | | | | | | | Up until now, it has returned the AVFilterFormats list via an AVFilterFormats** parameter; the actual return value was an int that was always AVERROR(ENOMEM) on error. The AVFilterFormats** argument was a pure output parameter which was only documented by naming the parameter rfmts. Yet nevertheless all callers initialized the underlying AVFilterFormats* to NULL. This commit changes this to return a pointer to AVFilterFormats directly. This is more in line with the API in general, as it allows to avoid checks for intermediate values. Reviewed-by: Nicolas George <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avfilter/vf_swaprect: Use ff_formats_pixdesc_filter()Andreas Rheinhardt2021-09-261-11/+7
| | | | | | Reviewed-by: Nicolas George <[email protected]> Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avfilter/vf_colorbalance: fix min/max check that can never be truePaul B Mahol2021-09-261-20/+20
| | | | While here change doubles to floats.
* avfilter/vf_selectivecolor: reduce number of operations with r/g/b/a pointersPaul B Mahol2021-09-261-12/+29
|
* avfilter/vf_selectivecolor: refactor some repeating calculationsPaul B Mahol2021-09-261-6/+9
|
* avformat/dv: Set AVFMTCTX_NOHEADER flagAndreas Rheinhardt2021-09-261-0/+3
| | | | | | Audio streams are only added when a packet is read. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/argo_asf: Use memcpy to copy string without its NULAndreas Rheinhardt2021-09-261-12/+6
| | | | | | | | This avoids a -Wstringop-truncation warning from GCC which takes issue with the fact that the destination might not be NUL-terminated. Reviewed-by: Zane van Iperen <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/jvdec: Make sizeof(JVFrame) smaller to save memoryAndreas Rheinhardt2021-09-261-2/+2
| | | | | Reviewed-by: Peter Ross <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* webp: fix transforms after a palette with pixel packing.Maryla2021-09-254-17/+29
| | | | | | | | | | | | | | | When a color indexing transform with 16 or fewer colors is used, WebP uses "pixel packing", i.e. storing several pixels in one byte, which virtually reduces the width of the image (see WebPContext's reduced_width field). This reduced_width should always be used when reading and applying subsequent transforms. Updated patch with added fate test. The source image dual_transform.webp can be downloaded by cloning https://chromium.googlesource.com/webm/libwebp-test-data/ Fixes: 9368 Signed-off-by: James Zern <[email protected]>
* fate/subtitles: Add JACOsub remuxing testAndreas Rheinhardt2021-09-252-0/+21
| | | | | | | This muxer was untested up until now; had it been tested, it would have been obvious that it has been broken for years. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/jacosubenc: Fix writing extradataAndreas Rheinhardt2021-09-251-1/+1
| | | | | | | | | | | The terminating '\0' is no longer included in the size of the extradata output by the demuxer since commit 36e61e24e7ac737b38c4382d439329352d9e0c29. E.g. if one remuxes the JACOsub sample JACOsub_capability_tester.jss from the FATE suite, one receives a file not recognized as JACOsub before this patch. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/qsvenc: Remove dead code for user-provided buffersAndreas Rheinhardt2021-09-251-17/+1
| | | | | | | Dead since commit 93016f5d1d280f9cb7856883af287fa66affc04c which ensured that the packets received by encoders are always blank. Signed-off-by: Andreas Rheinhardt <[email protected]>