summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avfilter/x86/vf_blend: use unaligned movs for outputMarton Balint2022-03-21
| | | | | | | | Fixes crashes with: ffmpeg -f lavfi -i allyuv=d=1 -vf tblend=difference128,pad=5000:ih:1 -f null x Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: don't shadow global variableZhao Zhili2022-03-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: check AVFMT_NO_BYTE_SEEK flag for seek_by_bytesZhao Zhili2022-03-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/hls: add AVFMT_NO_BYTE_SEEK flagZhao Zhili2022-03-21
| | | | | | | After d6ac6650b91, ffplay failed to seek HLS stream with AVSEEK_FLAG_BYTE enabled by default. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/opus: always use ambisonic layout for mapping family 2James Almer2022-03-20
| | | | | | | | | | | No need to use a Custom layout when the non diegetic channels can be described as a standard mask. This fixes: 45684/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-5039410989629440 Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/bsf: improve doxyAnton Khirnov2022-03-19
|
* lavc/bsf: add general documentationAnton Khirnov2022-03-19
| | | | Also, place the BSF api docs in their own doxygen group.
* doc/APIchanges: update for the new channel layout APIAnton Khirnov2022-03-19
|
* avformat/concat: refactor to use ff_rescale_interval()Pierre-Anthony Lemieux2022-03-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: refactor to use ff_rescale_interval()Pierre-Anthony Lemieux2022-03-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/tests: add test for ff_rescale_interval()Pierre-Anthony Lemieux2022-03-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/seek: add ff_rescale_interval() functionPierre-Anthony Lemieux2022-03-19
| | | | | | Refactors a function used by avformat/concat and avformat/imf. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: clean-up and reduce loggingPierre-Anthony Lemieux2022-03-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: add support for input seekingPierre-Anthony Lemieux2022-03-19
| | | | | | | | | | | The IMF demuxer did not implement AVInputFormat::read_seek2(), resulting in inefficient input seeking. Addresses https://trac.ffmpeg.org/ticket/9648 Byte- and frame-seeking are not supported. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/imf: relocate static function imf_time_to_ts()Pierre-Anthony Lemieux2022-03-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avfilter/af_afftdn: remove unused or set only variablesPaul B Mahol2022-03-19
|
* avfilter/avf_ahistogram: fix off by one in slide modePaul B Mahol2022-03-19
|
* configure: Add missing cri->mjpegdec dependencyAndreas Rheinhardt2022-03-19
| | | | | | | | The CRI decoder is useless without the MJPEG-decoder (its init-function always errors out). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/flashsv2enc: Avoid opening and closing z_streamAndreas Rheinhardt2022-03-19
| | | | | | Instead initialize a z_stream during init and reset it when needed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/lclenc: Use ff_deflate_init/end() wrappersAndreas Rheinhardt2022-03-19
| | | | | | | | | They return nicer error messages on error; furthermore, they also use our allocation functions. It also stops calling deflateEnd() on a z_stream that might not have been successfully initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pngenc: Use ff_deflate_init/end() wrappersAndreas Rheinhardt2022-03-19
| | | | | | They return nicer error messages. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/zmbvenc: Use ff_deflate_init/end() wrappersAndreas Rheinhardt2022-03-19
| | | | | | | They emit better error messages (it does not claim that inflateInit failed upon an error from deflateInit!) and uses our allocation functions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/zlib_wrapper: Add wrapper for deflateInit()Andreas Rheinhardt2022-03-19
| | | | | | | | | | | The rationale is the same as for the wrappers for inflateInit(), although the case for it is admittedly not so strong because there are less users of deflateInit(). Also remove an unnecessary inclusion of config.h in libavformat/protocols.c in order to trigger a request for reconfigure (which is needed for CONFIG_DEFLATE_WRAPPER to take effect). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pngenc: Don't use deflateInit2() with default parametersAndreas Rheinhardt2022-03-19
| | | | | | Use deflateInit() instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pngdec: Don't open and close z_streams unnecessarilyAndreas Rheinhardt2022-03-19
| | | | | | | | Instead reuse and reset a single z_stream. Also use FFZStream in decode_zbuf(), because it has nicer error messages. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/lscrdec: Don't open and close z_streams unnecessarilyAndreas Rheinhardt2022-03-19
| | | | | | Instead reuse and reset a single z_stream. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/zlib_wrapper: Use our allocation, freeing functionsAndreas Rheinhardt2022-03-19
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/flashsv: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/lcldec: Use ff_inflate_init/end(), cleanup genericallyAndreas Rheinhardt2022-03-19
| | | | | | | | | Returns better error messages in case of error and deduplicates the inflateInit() code and also allows to cleanup generically in case of errors as it is save to call ff_inflate_end() if ff_inflate_init() has not been called successfully. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mscc: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mvha: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mwsc: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rasc: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tscc: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | Returns better error messages in case of error and deduplicates the inflateInit() code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/wcmv: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/zerocodec: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/zmbv: Use ff_inflate_init/end()Andreas Rheinhardt2022-03-19
| | | | | | | Returns better error messages in case of error and deduplicates the inflateInit() code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/zlib_wrapper: Add wrappers for zlib inflateInit, inflateEndAndreas Rheinhardt2022-03-19
| | | | | | | | | | | | | | | | | It is not documented to be safe to call inflateEnd() on a z_stream that has never been successfully been initialized by inflateInit(), but just zeroed. It just happens to work and several codecs rely on this (they have FF_CODEC_CAP_INIT_CLEANUP set and even call inflateEnd() when inflateInit() failed or has never been called). To avoid this, other codecs recorded whether their zstream has been initialized successfully or not. This commit adds wrappers for inflateInit() and inflateEnd() that do what these other codecs do; furthermore, they also take care of properly setting up the zstream before inflateInit() and emit an error message in case of error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pngenc: Avoid potentially truncating integersAndreas Rheinhardt2022-03-19
| | | | | | | | | So use 64bits for max_packet_size instead of size_t which might be 32 bits; this is consistent with ff_alloc_packet(). Also remove a redundant size check (ff_alloc_packet() already checks for that). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Keep including the full version.h when headers are included externallyMartin Storsjö2022-03-19
| | | | | | | | | This avoids unnecessary churn and build breakage for users, by making sure the whole version.h is included like it has been so far, while keeping the benefit of not needing to rebuild most files in the ffmpeg tree on minor/micro bumps. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/pcmdec: add support to set channel layoutPaul B Mahol2022-03-18
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avutil/opt: add missing case for AV_OPT_TYPE_CHLAYOUT in av_opt_free()James Almer2022-03-18
| | | | | | Fixes potential memleaks for existing options of this type. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: Check pre_nsMichael Niedermayer2022-03-18
| | | | | | | | Fixes: division by 0 Fixes: 44615/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6681108677263360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sonic: Use unsigned for predictor_k to avoid undefined behaviorMichael Niedermayer2022-03-18
| | | | | | | | Fixes: signed integer overflow: -1094995529 * 24 cannot be represented in type 'int' Fixes: 44436/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-4874459459223552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ccaption_dec: Use ff_ass_add_rect2()Michael Niedermayer2022-03-18
| | | | | | | | Fixes: Timeout Fixes: 42258/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CCAPTION_fuzzer-5540144118104064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ass: Faster ff_ass_add_rect()Michael Niedermayer2022-03-18
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/setts_bsf: fix memleakZhao Zhili2022-03-18
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/alsdec: Set channels from data after data is setMichael Niedermayer2022-03-18
| | | | | | | | | | Fixes: out of array write Fixes: 45624/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-6473487382872064 Fixes: 45626/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-4874997192065024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dfpwmdec: Check packet size more completelyMichael Niedermayer2022-03-18
| | | | | | | | | | Fixes: out of array access Fixes: 45497/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFPWM_fuzzer-5239786212818944.fuzz Fixes: 45510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFPWM_fuzzer-4947856883056640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_afftdn: do not profile noise if number of sampled blocks is 0Paul B Mahol2022-03-18
|