summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avcodec/sonic: Fix several integer overflowsMichael Niedermayer2020-06-14
| | | | | | | | Fixes: signed integer overflow: 2129689466 + 2129689466 cannot be represented in type 'int' Fixes: 20715/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5155263109922816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/oggdec: Disable mid stream codec changesMichael Niedermayer2020-06-14
| | | | | | | | | Fixes: 22082/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5688619118624768 Fixes: crash from V-codecs/Theora/theora_testsuite_broken/multi2.ogg Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Suggested-by: Lynne on IRC Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videodec: avoid invalid values and reinitialize in format ↵Michael Niedermayer2020-06-14
| | | | | | | | | | changes for studio profile Fixes: out of array access Fixes: 23327/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5134822992510976 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pixlet: Fix log(0) checkMichael Niedermayer2020-06-14
| | | | | | | | Fixes: passing zero to clz(), which is not a valid argument Fixes: 23337/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PIXLET_fuzzer-5179131989065728 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ape: Cleanup after ape_read_header() failureMichael Niedermayer2020-06-14
| | | | | | | | Fixes: memleaks Fixes: 23306/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5635436931448832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/iff: Fix off by x errorMichael Niedermayer2020-06-14
| | | | | | | | Fixes: out of array access Fixes: 23245/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5723121327013888.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: cosmetic fixesNelson Gomez2020-06-14
| | | | Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
* swscale/x86/output: add AVX2 version of yuv2nv12cXNelson Gomez2020-06-14
| | | | | | | | | | 256 bits is just wide enough to fit all the operands needed to vectorize the software implementation, but AVX2 is needed to for a couple of instructions like cross-lane permutation. Output is bit-for-bit identical to C. Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
* swscale: make yuv2interleavedX more asm-friendlyNelson Gomez2020-06-14
| | | | | | | | | Extracting information from SwsContext in assembly is difficult, and rearranging SwsContext just for asm access didn't look good. These functions only need a couple of fields from it anyway, so just make them parameters in their own right. Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
* avcodec/smvjpegdec: remove uninitialized retLimin Wang2020-06-14
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpegvideo: remove extra spaceLimin Wang2020-06-14
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale/utils: return better error code from initFilter()Limin Wang2020-06-14
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale/utils: reindentLimin Wang2020-06-14
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* lavf/prompeg: prompeg_write() must report data all was writtenDavid Holroyd2020-06-14
| | | | | | | | | | | | | | | | Previously, prompeg_write() would only report to caller that bytes we written when a FEC packet was actually created. Not all RTP packets are expected to generate a FEC packet however, so this behavior was causing avio to retry writing the RTP packet, eventually forcing the FEC state machine to send a FEC packet erroneously (and so breaking out of the retry loop). This was resulting in incorrect FEC data being generated, and far too many FEC packets to be sent (~100% FEC overhead). fix #7863 Signed-off-by: David Holroyd <david.holroyd@m2amedia.tv>
* lavu/internal: Fix comment for avpriv_dict_set_timestampJun Zhao2020-06-14
| | | | | | Fix comment for avpriv_dict_set_timestamp from b72a7b96f84 Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavc/qsv: fix make checkheaders warningJun Zhao2020-06-14
| | | | | | | | | | | | | make checkheaders will get warning as follow: In file included from libavcodec/qsv_internal.h.c:1: ./libavcodec/qsv_internal.h:24:5: warning: "CONFIG_VAAPI" is not defined, evaluates to 0 [-Wundef] 24 | #if CONFIG_VAAPI | ^~~~~~~~~~~~ include "config.h" to fix the warning Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/sccdec: move pos variables outside of loopPaul B Mahol2020-06-13
| | | | Ensures that sub->pos is always correct.
* avcodec/ccaption_dec: switch active screen in end of caption earlyPaul B Mahol2020-06-13
| | | | Fixes dropping of last caption.
* avcodec/ccaption_dec: remove unused arguments from functionPaul B Mahol2020-06-13
|
* avcodec/ccaption_dec: check for error codesPaul B Mahol2020-06-13
|
* avutil/internal: remove FF_ALLOCx{_ARRAY}_OR_GOTO macrosLimin Wang2020-06-13
| | | | | | | | | | | | | | | | | These functions have a terrible design, let us fix them before extending them. First design mistake: no error code. A helper function for testing memory allocation failure where AVERROR(ENOMEM) does not appear is absurd. Second design mistake: printing a message. Return the error code, let the caller print the error message. Third design mistake: hard-coded use of goto. http://ffmpeg.org/pipermail/ffmpeg-devel/2020-May/262544.html Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale/utils: remove FF_ALLOC_ARRAY_OR_GOTO macrosLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/alac: remove FF_ALLOC_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpegvideo_enc: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos lableLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpegpicture: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpegvideo: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/mpegvideo: simplify check for av_frame_allocLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/iirfilter: remove FF_ALLOCZ_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/aacenc: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/ac3enc_template: remove FF_ALLOC_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/ac3enc: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/snow: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/dnxhdenc: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/twinvq: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos labelLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/apedec: remove FF_ALLOC_OR_GOTO and gotos lableLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec: add FF_CODEC_CAP_INIT_CLEANUP for all codecs which use ↵Limin Wang2020-06-13
| | | | | | ff_mpv_common_init() Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/alac: Add FF_CODEC_CAP_INIT_CLEANUPLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/aacenc: add FF_CODEC_CAP_INIT_CLEANUPLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/ac3enc: add FF_CODEC_CAP_INIT_CLEANUPLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/apedec: add FF_CODEC_CAP_INIT_CLEANUPLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/adpcmenc: remove FF_ALLOC_OR_GOTO macros and gotos lableLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/h264dec: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos lableLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/h264dec: store count of the tables into const variable for long linesLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/h264dec: cosmeticsLimin Wang2020-06-13
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/wmalosslessdec: Check block_align maximumMichael Niedermayer2020-06-13
| | | | | | | | Fixes: Assertion failure Fixes: 22737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5958388889681920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/loco: Fix signed integer overflow in loco_get_rice()Michael Niedermayer2020-06-13
| | | | | | | | Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 22975/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LOCO_fuzzer-5658160970072064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/thp: Check fpsMichael Niedermayer2020-06-13
| | | | | | | | Fixes: division by zero Fixes: 23162/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4856420817436672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpl2dec: Fix integer overflow with durationMichael Niedermayer2020-06-13
| | | | | | | | Fixes: signed integer overflow: 9223372036854775807 - -1 cannot be represented in type 'long' Fixes: 23167/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6425051741290496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cbs: Allocate more CodedBitstreamUnit at once in cbs_insert_unit()Michael Niedermayer2020-06-13
| | | | | | | | | | Fixes: Timeout (85sec -> 0.5sec) Fixes: 20791/clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_FRAME_SPLIT_fuzzer-5659537719951360 Fixes: 21214/clusterfuzz-testcase-minimized-ffmpeg_BSF_MPEG2_METADATA_fuzzer-5165560875974656 Fixes: 21247/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-5715175257931776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Check if DTS is AV_NOPTS_VALUE in mov_find_next_sample().Dale Curtis2020-06-13
| | | | | Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>