summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avformat/dss: Set values known during read_header in read_headerAndreas Rheinhardt2021-04-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mpegtsenc: Preserve disposition in the absence of languageAndreas Rheinhardt2021-04-05
| | | | | | | Implements ticket #9113. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_find_rect: Use correct format specifierAndreas Rheinhardt2021-04-04
| | | | | | | | | Fixes the following GCC warning: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘int64_t’ {aka ‘long int’} [-Wformat=] Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* atomics: Fix the win32 atomic_exchange functionMartin Storsjö2021-04-04
| | | | | | | | | | This fixes building with MSVC after a2a38b160620d91bc3f895dadc4501c589998b9c. Remove the stray semicolon, and add casts for the input argument (which is an intptr_t*) to the right type (PVOID volatile *). Signed-off-by: Martin Storsjö <martin@martin.st>
* avfilter/find_rect: write score to metadataGyan Doshi2021-04-04
|
* avfilter/find_rect: add option to discard non-matching framesGyan Doshi2021-04-04
| | | | Default is disabled.
* avfilter/find_rect: improve loggingGyan Doshi2021-04-04
| | | | | Log now indicates timestamps of frames where a match is made. Loglevel is changed to INFO since the user specifically wants this info.
* avcodec/wmavoice: Check operations that can failAndreas Rheinhardt2021-04-03
| | | | | | There might be segfaults on failure. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegdec: Fix leak in case ICC array allocations fail partiallyAndreas Rheinhardt2021-04-03
| | | | | | | | | If only one of the two arrays used for the ICC profile could be successfully allocated, it might be overwritten and leak when the next ICC entry is encountered. Fix this by using a common struct, so that one has only one array to allocate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/cfhd: Keep track of which subbands have been readMichael Niedermayer2021-04-03
| | | | | | | | | | | | | | This avoids use of uninitialized data also several checks are inside the band reading code so it is important that it is run at least once Fixes: out of array accesses Fixes: 28209/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5684714694377472 Fixes: 32124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5425980681355264 Fixes: 30519/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4558757155700736 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cfhd: Require valid setup before Lowpass coefficients, BandHeader ↵Michael Niedermayer2021-04-03
| | | | | | | | | and BandSecondPass Previously the code skipped all security checks when these where encountered but prior data was incorrect. Also replace an always true condition by an assert Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cfhd: Check transform_type consistentlyMichael Niedermayer2021-04-03
| | | | | | | | | | Fixes: out of array accesses Fixes: 29754/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6333598414274560 Fixes: 30519/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6298424511168512 Fixes: 30739/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5011292836462592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: Check initializing Huffman tablesAndreas Rheinhardt2021-04-03
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegdec: Fix leak in case of invalid external Huffman tablesAndreas Rheinhardt2021-04-03
| | | | | | | | | | | | | When using external Huffman tables fails during init, the decoder reverts back to using the default Huffman tables; and when doing so, the current VLC tables leak because init_default_huffman_tables() doesn't free them before overwriting them. Sample: samples.ffmpeg.org/archive/all/avi+mjpeg+pcm_s16le++mjpeg-interlace.avi Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/a64multienc: Don't use static buffers, fix potential racesAndreas Rheinhardt2021-04-03
| | | | | | | | | | | | render_charset() used static buffers that are always completely initialized before every use, so that it is unnecessary for the values in these arrays to be kept after leaving the function. Given that this is not only unnecessary, but harmful due to the possibility of data races if several instances of a64multi/a64multi5 run simultaneously these buffers have been replaced by ordinary buffers on the stack (they are small enough for this). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rawdec: Free bitstream_bufAndreas Rheinhardt2021-04-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc/ffmpeg: clarify what -hwaccels list indicatesGyan Doshi2021-04-03
| | | | Fixes #8204
* avformat/vividas: Fix crash when seeking without audio streamAndreas Rheinhardt2021-04-02
| | | | | | | The current code tries the access the codecpar of a nonexistent audio stream when seeking. Stop that. Fixes ticket #9121. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/cpu: Fix race condition in av_cpu_count()Andreas Rheinhardt2021-04-02
| | | | | | | | | | av_cpu_count() intends to emit a debug message containing the number of logical cores when called the first time. The check currently works with a static volatile int; yet this does not help at all in case of concurrent accesses by multiple threads. So replace this with an atomic_int. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ass_split: Don't presume strlen to be >= 2Andreas Rheinhardt2021-04-02
| | | | | | Fixes potential heap-buffer-overflow. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/binkaudio: Check return value of functions that can failAndreas Rheinhardt2021-04-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/binkaudio: Fix memleak upon init failureAndreas Rheinhardt2021-04-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/flacenc: Fix memleak upon init errorAndreas Rheinhardt2021-04-02
| | | | | | An AVMD5 struct would leak if an error happened after its allocation. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/proresenc_anatoliy: Fix memleak upon init errorAndreas Rheinhardt2021-04-02
| | | | | | | A buffer may leak in case of YUVA444P10 with dimensions that are not both divisible by 16. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/bsf: Fix segfault when freeing half-allocated BSFAndreas Rheinhardt2021-04-02
| | | | | | | When allocating a BSF fails, it could happen that the BSF's close function has been called despite a failure to allocate the private data. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/av1_metadata_bsf: Check for the existence of unitsAndreas Rheinhardt2021-04-02
| | | | | | | Fixes a crash with ISOBMFF extradata containing no OBUs. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_metadata_bsf: Don't add AUD to extradataAndreas Rheinhardt2021-04-02
| | | | | | | This is a regression since switching to the generic CBS BSF code. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tiff: Don't use separate temporary buffer for faxAndreas Rheinhardt2021-04-02
| | | | | | | | Also don't unnecessarily copy the input data around if it needn't be reversed; and remove a redundant memset -- av_fast_padded_malloc() already does this for us. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/msmpeg4enc: Don't use code for static init that can failAndreas Rheinhardt2021-04-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/dss: Don't prematurely modify context variableAndreas Rheinhardt2021-04-02
| | | | | | | | | | | | | | | | The DSS demuxer currently decrements a counter that should be positive at the beginning of read_packet; should it become negative, it means that the data to be read can't be read contiguosly, but has to be read in two parts. In this case the counter is incremented again after the first read if said read succeeded; if not, the counter stays negative. This can lead to problems in further read_packet calls; in tickets #9020 and #9023 it led to segfaults if one tries to seek lateron if the seek failed and generic seek tried to read from the beginning. But it could also happen when av_new_packet() failed and the user attempted to read again afterwards. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Check allocations for failureAndreas Rheinhardt2021-04-02
| | | | | | There would be leaks in case of failure. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3enc: Simplify AC-3 bit countingAndreas Rheinhardt2021-04-02
| | | | | | | | | | | | | | When encoding E-AC-3, whether coupling is on or not determines whether an additional frame based coupling exponent strategy element frmcplexpstr (of size five bits) is present in the bitstream. So just add five to the number of bits when counting them instead of adding 5*s->cpl_on (the latter field is currently only 0 or 1, so it doesn't make a difference). Furthermore, move some parts of the bit allocation that doesn't change per-frame to count_frame_bits_fixed() (which is only run once during init). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/[e]ac3enc: Fix indentationAndreas Rheinhardt2021-04-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3enc: Avoid needlessly copying encoded packets aroundAndreas Rheinhardt2021-04-02
| | | | | | | | | AC-3 and EAC-3 are codecs whose packet sizes are known in advance, so one can use the min_size parameter of ff_alloc_packet2() to allocate exactly this amount. This avoids a memcpy later in av_packet_make_refcounted() in encode_simple_internal(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3enc: Use actual size of buffer in init_put_bits()Andreas Rheinhardt2021-04-02
| | | | | | | | | | | | Since the very beginning (since de6d9b6404bfd1c589799142da5a95428f146edd) the AC-3 encoder used AC3_MAX_CODED_FRAME_SIZE (namely 3840) for the size of the output buffer (without any check at all). This causes problems when encoding EAC-3 for which the maximum is too small, smaller than the actual size of the buffer: One can run into asserts used by the PutBits API. Ticket #8513 is about such a case and this commit fixes it by using the real size of the buffer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc/muxers: add entry for A64 muxerGyan Doshi2021-04-02
|
* doc/encoders: add entry for a64 encodersGyan Doshi2021-04-02
|
* avcodec/adpcmenc: don't share a single AVClass between multiple AVCodecs.Zane van Iperen2021-04-02
| | | | | | | Temporary fix until AVClass::child_class_next is gone. Reviewed-By: James Almer <jamrial@gmail.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* libswscale/x86/yuv2yuvX: Removes unrolling for mmx and mmxextAlan Kelly2021-04-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswscale/x86/swscale: Only call ff_yuv2yuvX functions if the input size is > 0Alan Kelly2021-04-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tests/checkasm/sw_scale: adds additional tests sizes for yux2yuvXAlan Kelly2021-04-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/asf: Use ff_add_attached_pic() to read attached picsAndreas Rheinhardt2021-04-01
| | | | | | Also removes a stack packet. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Free new streams in ff_add_attached_pic on errorAndreas Rheinhardt2021-04-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Add and use helper function to add attachment streamsAndreas Rheinhardt2021-04-01
| | | | | | | | | All instances of adding attached pictures to a stream or adding a stream and an attached packet to said stream have several things in common like setting the index and flags of the packet, setting the stream disposition etc. This commit therefore factors this out. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/flashsv2enc: Fix undefined NULL + 0Andreas Rheinhardt2021-04-01
| | | | | | Affected the vsynth*-flashsv2 FATE-tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil/pixdesc: Fix 1 << 32Andreas Rheinhardt2021-04-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/motion_est: Fix invalid left shift of negative numbersAndreas Rheinhardt2021-04-01
| | | | | | Affected many FATE-tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_codecview: Fix undefined left shifts of negative numbersAndreas Rheinhardt2021-04-01
| | | | | | Affected the filter-codecview-mvs FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/g2meet: Fix undefined NULL + 0Andreas Rheinhardt2021-04-01
| | | | | | Affected the g2m4 FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil/base64: Fix undefined NULL + 0Andreas Rheinhardt2021-04-01
| | | | | | Affected the base64 FATE test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>