aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* avcodec/encode: silence a deprecation warning about av_init_packet()James Almer2021-03-171-0/+2
| | | | | | No need to adapt this code as it will be removed long before av_init_packet() Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cri: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-6/+10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/packet_internal: make avpriv_packet_list_* functions use an internal ↵James Almer2021-03-1716-58/+67
| | | | | | | | | struct The next pointer is kept at the end for backwards compatability until the major bump, when it should ideally be moved at the front. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/packet: deprecate av_init_packet()James Almer2021-03-175-13/+46
| | | | | | Once removed, sizeof(AVPacket) will stop being a part of the public ABI. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/vaapi_encode: use AVCodecContext.get_encode_buffer()James Almer2021-03-177-7/+12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: use AVCodecContext.get_encode_buffer()James Almer2021-03-173-3/+3
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mfenc: use AVCodecContext.get_encode_buffer()James Almer2021-03-171-2/+3
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/librav1e: use AVCodecContext.get_encode_buffer()James Almer2021-03-171-2/+3
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/amfenc: use AVCodecContext.get_encode_buffer()James Almer2021-03-173-3/+5
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: Handle when we have an mfra box but have not read the full ↵Derek Buitenhuis2021-03-171-0/+4
| | | | | | | | | | | | | sidx for a fragment Use the tfra timestamp if it is available and sidx timestamp is not. Fixes reading the entire file after seeking in a live-style DASH FMP4 with an MFRA. This specifically fixes when use_mfra_for is set. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/libdavs2: unbreak compilation failureGyan Doshi2021-03-171-0/+1
| | | | | | FF_CODEC_CAP_AUTO_THREADS added in 8a129077cc requires internal.h Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avformat/aviobuf: don't reduce short seek thresholdAndriy Gelman2021-03-161-7/+3
| | | | | | | | | | | | | | | | | | | | Commit 8c8e5d5286bf598a89ef9993a2cf6ea409d03a32 added a way to reduce seek time by waiting for the windowed tcp packets instead of creating a new socket connection. It implemented this by overwriting s->short_seek_threshold in avio_seek(). However, s->short_seek_threshold could already be set and be higher than the threshold set by the protocol (i.e. s->short_seek_threshold is set in ff_configure_buffers_for_index()). This new feature was only enabled for tls connections in 70d8077b795766e2486e6ec8110f22a97362d6d6. As in Ticket #9148 it reduced performance because instead of waiting to refill the AVIOContext buffers with an existing connections, a new HTTP request was often made instead. Fixes Ticket #9148. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* lavc: drop unused argument from lock_avcodec()Anton Khirnov2021-03-161-3/+3
|
* lavc: drop ff_ prefix from ff_(un)lock_avcodecAnton Khirnov2021-03-161-6/+6
| | | | It is unnecessary and misleading, as those are static functions.
* lavc: move decoder bsf init into decoder-specific codeAnton Khirnov2021-03-163-13/+7
|
* lavc: factor decoder validation/setup from avcodec_open2()Anton Khirnov2021-03-163-41/+52
|
* lavc/encode: reindent after previous commitAnton Khirnov2021-03-161-123/+123
|
* lavc: factor out encoder init/validation from avcodec_open2()Anton Khirnov2021-03-163-163/+166
| | | | | | avcodec_open2() is massive, splitting it makes it more readable. Also, add a missing error code to ticks_per_frame sanity check.
* cmdutils: replace strncpy() with direct assignmentAnton Khirnov2021-03-161-2/+2
| | | | | | | | Only one character is actually rewritten. Fixes truncation warnings, such as warning: ‘strncpy’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation] in gcc 10.2.0
* lavc: rename AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADSAnton Khirnov2021-03-1619-25/+38
| | | | | | | | | | This cap is currently used to mark multithreading-capable codecs that wrap external libraries with their own multithreading code. The name is highly confusing for our API users, since libavcodec ALWAYS handles thread_count=0 (see commit message in previous commit). Therefore rename the cap and update its documentation to make its meaning clear. The old name is kept deprecated until next+1 major bump.
* lavc: replace internal use of AV_CODEC_CAP_AUTO_THREADS with an internal capAnton Khirnov2021-03-1618-13/+33
| | | | | | | | | | | | | | | | AV_CODEC_CAP_AUTO_THREADS was originally added in b4d44a45f9a to mark codecs that spawn threads internally and are able to select an optimal threads count by themselves (all such codecs are wrappers around external libraries). It is used by lavc generic code to check whether it should handle thread_count=0 itself or pass the zero directly to the codec implementation. Within this meaning, it is clearly supposed to be an internal cap rather than a public one, since from the viewpoint of a libavcodec user, lavc ALWAYS handles thread_count=0. Whether it happens in the generic code or within the codec internals is not a meaningful difference for the caller. External aspects of this flag will be dealt with in the following commit.
* doc/encoders: Remove text about single bit-depth libx264 supportTobias Rapp2021-03-161-3/+1
| | | | | | | | In the meanwhile libx264 allows to be configured for including both 8/10 bit support within a single library. The new libx264 interface was enabled in 2f96190732d15510ba29471fa45d66841c0c3df1. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* avformat/matroskadec: Check for EOF in resync loopMichael Niedermayer2021-03-151-0/+2
| | | | | | | | | Fixes: Timeout (too long -> instantly) Fixes: 29136/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4586141227548672 Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@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>
* avcodec/utils: Use more bits for intermediate for AV_CODEC_ID_ADPCM_MSMichael Niedermayer2021-03-151-1/+1
| | | | | | | | Fixes: signed integer overflow: 1172577312 * 2 cannot be represented in type 'int' Fixes: 29924/clusterfuzz-testcase-minimized-ffmpeg_dem_BOA_fuzzer-4882912874594304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ipmovie: Free packets allocated in header readingMichael Niedermayer2021-03-151-2/+6
| | | | | | | | Fixes: memleaks Fixes: 29905/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5679700745781248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavformat/hls: Reset options after open_url_keepalive() failsEd Martin2021-03-151-0/+2
| | | | | | | | | | | | | | open_url_keepalive() unsets the options when it uses them, this includes the offsets for the Range: header. When using the HLS tag #EXT-X-BYTERANGE along with multiple files, the range options must be preserved after open_url_keepalive() returns EOF so that the new file can be opened. Failure to do this results in ignoring the #EXT-X-BYTERANGE tag and reading the wrong bytes of the file. To fix it, reset the options before calling io_open() following open_url_keepalive() reaching EOF Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
* avcodec/decode: Remove outdated commentAndreas Rheinhardt2021-03-151-1/+0
| | | | | | | Removing it was forgotten in 417d473bde220a1f267bc694835c129a5adc4309. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil/avstring: Check for memory allocation error in av_escapeAndreas Rheinhardt2021-03-151-3/+4
| | | | | | | | av_bprint_finalize() can still fail even when it has been checked that the AVBPrint is currently complete: Namely if the string was so short that it fit into the AVBPrint's internal buffer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil/avstring: Limit string length in av_escape to range of intAndreas Rheinhardt2021-03-151-1/+1
| | | | | | Otherwise the caller can't distinguish the return value from an error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h264_cavlc: Reindent after the previous commitAndreas Rheinhardt2021-03-151-76/+76
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/h264_cavlc: Remove redundant checkAndreas Rheinhardt2021-03-151-5/+0
| | | | | | | | | | The only caller to ff_h264_decode_init_vlc() already uses ff_thread_once() for the call; ergo the check via a simple int with static storage duration in ff_h264_decode_init_vlc() is redundant. And if it were not redundant, it would be a potential for data races. So remove it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* doc/APIchanges: Fill in some missing informationMichael Niedermayer2021-03-141-24/+24
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpegls: Check A[Q] for overflow in ff_jpegls_update_state_regular()Michael Niedermayer2021-03-141-1/+1
| | | | | | | | Fixes: Timeout Fixes: 30912/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5556235476795392 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/voc_packet: prevent remaining size from becoming negative in ↵Michael Niedermayer2021-03-141-1/+13
| | | | | | | | | | ff_voc_get_packet() Fixes: memleak Fixes: 30909/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4886284057313280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/timecode: Avoid fps overflowMichael Niedermayer2021-03-141-2/+2
| | | | | | | | Fixes: Integer overflow and division by 0 Fixes: poc-202102-div.mov Found-by: 1vanChen of NSFOCUS Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mvi: Check audio size for more overflowsMichael Niedermayer2021-03-141-0/+4
| | | | | | | | Fixes: left shift of negative value -352256000 Fixes: 30837/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-5755626262888448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/samidec: Deallocate hdr_bufMichael Niedermayer2021-03-141-0/+2
| | | | | | | | Fixes: memleak Fixes: 30841/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-4521799196999680 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: Fix negative shift in cfhd_decode()Michael Niedermayer2021-03-141-2/+2
| | | | | | | | Fixes: left shift of negative value -1 Fixes: 30714/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4867823371419648 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avdevice/xcbgrab: Add option for grabbing a windowsgerwk2021-03-142-19/+66
| | | | | | | | The option allows to select a specific window instead of the whole screen. Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec: add a mention about get_encode_buffer in the old encode API doxyJames Almer2021-03-141-2/+6
| | | | | | | | Direct users to the callback that should be used to keep supporting user provided buffers with the new encode API. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_xfade: drop unused frames from inactive inputsPaul B Mahol2021-03-141-0/+5
|
* doc/filters: note default for zoompan's durationGyan Doshi2021-03-141-1/+1
|
* avcodec/flacdec: Avoid undefined shift in error caseMichael Niedermayer2021-03-131-1/+1
| | | | | | | | Fixes: flac_1040988 Reported-by: Thomas Guilbert <tguilbert@google.com> Reviewed-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/cinedec: Fix index_entries size checkMichael Niedermayer2021-03-131-1/+1
| | | | | | | | Fixes: out of array access Fixes: 29868/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5692001957445632 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_metadata_bsf: Check nb_units before accessing the first in ↵Michael Niedermayer2021-03-131-1/+1
| | | | | | | | | | h264_metadata_update_fragment() Fixes: null pointer dereference Fixes: 29835/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-4712125383704576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aaxdec: Check that segments table has been initializedMichael Niedermayer2021-03-131-0/+5
| | | | | | | | Fixes: Timeout Fixes: 29766/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-5635887566290944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Check if trailer is availableMichael Niedermayer2021-03-131-2/+4
| | | | | | | | Fixes: out of array read Fixes: 29750/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-4808377272238080.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check col/line for integer overflowMichael Niedermayer2021-03-131-0/+5
| | | | | | | | Fixes: signed integer overflow: -2272 + -2147483360 cannot be represented in type 'int' Fixes: 30009/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5005660322398208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: add Changelog entry for librist and bump minorMarton Balint2021-03-132-1/+2
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/librist: clarify and limit buffer_sizeMarton Balint2021-03-132-2/+4
| | | | | | As suggested by librist developers. Signed-off-by: Marton Balint <cus@passwd.hu>