summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avformat/flvenc: Add deinit functionAndreas Rheinhardt2022-07-09
| | | | | | | | Fixes memleaks when the trailer is never written or when shift_data() fails when writing the trailer. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h26[45]_metadata_bsf: Fix range of chroma_sample_loc_typeAndreas Rheinhardt2022-07-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevc_ps: Fix wrong copyright yearsAndreas Rheinhardt2022-07-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dv: Remove unnecessary headerAndreas Rheinhardt2022-07-09
| | | | | | Forgotten in 6d484671ecb612c32cbda0fab65f961743aff5f8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/cbs: Mark init and close functions as av_coldAndreas Rheinhardt2022-07-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/encode: Avoid check whose result is known in advanceAndreas Rheinhardt2022-07-09
| | | | | | | | | | | | | | | encode_send_frame_internal() is always only called if the buffer packet is empty and except when we are dealing with an audio codec that does not allow variable frame size it stays that way until a call to av_frame_ref() at the end of encode_send_frame_internal(). In case we are dealing with the small last frame of an audio encoder requiring constant frame size the frame will be allocated by pad_last_frame() and this the only case where this is so. So by returning directly after pad_last_frame(), we can avoid having to recheck whether the frame is still empty before av_frame_ref(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: Ensure packet is writable before modifying itAndreas Rheinhardt2022-07-09
| | | | | | | | Fixes e.g. ffmpeg -i fate-suite/h264/bbc2.sample.h264 -c:v rawvideo -map 0:v -frames:v 10 -pix_fmt gray8 -f tee "first.mov|second.mov" Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: Add const to AVPacket data pointersAndreas Rheinhardt2022-07-09
| | | | | | | These packets need not be writable (and are not modified by us), so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Add const to decoder packet data pointersAndreas Rheinhardt2022-07-09
| | | | | | | The packets given to decoder need not be writable, so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* av(format|device): Add const to muxer packet data pointersAndreas Rheinhardt2022-07-09
| | | | | | | The packets given to muxers need not be writable, so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/apngenc: Add const where possibleAndreas Rheinhardt2022-07-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/apngenc: Don't modify input packetAndreas Rheinhardt2022-07-09
| | | | | | It might not be writable at this point. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/apngenc: Check fcTL sizeAndreas Rheinhardt2022-07-09
| | | | | | The remaining code relies on it having the value it should have. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/apngenc: Check for incomplete chunksAndreas Rheinhardt2022-07-09
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/apng: Add APNG_FCTL_CHUNK_SIZE defineAndreas Rheinhardt2022-07-09
| | | | | | Also use it where appropriate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Support for 16:9 DV in QuickTimeBrion Vibber2022-07-09
| | | | | | | | | | | | | | Some files I have from circa year 2000 are 16:9 NTSC DV video encoded as QuickTime with Radius SoftDV. This marked 4:3 videos with the box 'dvc ' for NTSC or 'dvcp' for PAL, which are already supported, but 16:9 videos as 'dvl ' or 'dvlp', which were not. Adding these to the list for DV codec processing gives the expected metadata and playback. I have not tested PAL as I have no sample data, only NTSC. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/vf_xfade: add two more transitionsPaul B Mahol2022-07-09
|
* avcodec/aacdec: fix parsing of dual mono filesJames Almer2022-07-08
| | | | | | | | | | Dual mono files report a channel count of 2 with each individual channel in its own SCE, instead of both in a single CPE as is the case with standard stereo. This commit handles this non default channel configuration scenario. Fixes ticket #1614 Signed-off-by: James Almer <jamrial@gmail.com>
* fftools: Fix preset search pathesNicolas Gaullier2022-07-08
| | | | | | | | | regression since 13350e81fd Fix looking for .ffmpeg subfolder in FFMPEG_DATADIR and inversely not in HOME. Fix search order (documentation). Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/openh264: return (DE|EN)CODER_NOT_FOUND if version check failsAndreas Schneider2022-07-08
| | | | | | | | A cosmetic change only, it basically just changes the user facing error message to clients that interpret the errors to something that makes sense. Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/sctp: close socket on errorsMichael Niedermayer2022-07-07
| | | | | | | | This is untested as i have no testcase Fixes: CID1302709 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/flashsv: Clear pointersMichael Niedermayer2022-07-07
| | | | | | | | Fixes: Use after free Fixes: 47399/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLASHSV2_fuzzer-5718646686613504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust threshold for SIMBIOSIS_IMXMichael Niedermayer2022-07-07
| | | | | | | | Fixes: Timeout Fixes: 47892/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIMBIOSIS_IMX_fuzzer-5160609278197760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/cinedec: Check size and pos moreMichael Niedermayer2022-07-07
| | | | | | | | Fixes: signed integer overflow: 9223372036848019263 + 134232320 cannot be represented in type 'long' Fixes: 48155/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5751429207293952 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust threshold for ARGOMichael Niedermayer2022-07-07
| | | | | | | | Fixes: Timeout Fixes: 48002/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-6187041768996864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aasc: Fix indentionMichael Niedermayer2022-07-07
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/flashsv: Check inflate() for failureMichael Niedermayer2022-07-07
| | | | | | Fixes: CID1047223 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/smacker: fix indention after previous commitMichael Niedermayer2022-07-07
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/smacker: Optimize constant 16bit audio outputMichael Niedermayer2022-07-07
| | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust threshold for smacker audioMichael Niedermayer2022-07-07
| | | | | | | | Fixes: Timeout Fixes: 47043/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-4824799337119744 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/img2enc: use unmatched filename for an invalid or missing sequence ↵Marton Balint2022-07-07
| | | | | | | | | | | pattern Also warn the user that for single images -update should be used, for sequences a proper pattern should be specified. Fixes ticket #9748. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/img2enc: fix first image checkMarton Balint2022-07-07
| | | | | | Start image number was hardcoded to 1 for the first image check. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter: add remap opencl filterPaul B Mahol2022-07-07
|
* avformat/mov: disallow a zero sample size in trun atomsMarton Balint2022-07-06
| | | | | | | | | | | In order to not generate 0 sized packets or create a huge index table needlessly. Fixes: Timeout Fixes: 43717/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5206008287330304 Fixes: 45738/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6142535657979904 Signed-off-by: Marton Balint <cus@passwd.hu>
* Revert "avformat/demux: Make read_frame_internal() return AVERREOR(EAGAIN) ↵Marton Balint2022-07-06
| | | | | | | | on stuck empty input parser" Hides the underlying real problem with a demuxer returning 0 sized packets. This reverts commit 02699490c14e86105104940c009953081f69432c.
* Revert "avformat/demux: Count EAGAIN as 100 bytes in relation to read limit ↵Marton Balint2022-07-06
| | | | | | | | | | in avformat_find_stream_info()" Modifying avformat_find_stream_info() behaviour based on the number of EAGAINs it encounters is a hack which usually only hides the real issue if such thing happen. This reverts commit b0cac7082d8a3ff2d4f039af01b45c48bb578de7.
* avutil/mem: Handle fast allocations near UINT_MAX properlyAndreas Rheinhardt2022-07-06
| | | | | | | | | | | | | | | | | | | | | av_fast_realloc and av_fast_mallocz? store the size of the objects they allocate in an unsigned. Yet they overallocate and currently they can allocate more than UINT_MAX bytes in case a user has requested a size of about UINT_MAX * 16 / 17 or more if SIZE_MAX > UINT_MAX (and if the user increased max_alloc_size via av_max_alloc). In this case it is impossible to store the true size of the buffer via the unsigned*; future requests are likely to use the (re)allocation codepath even if the buffer is actually large enough because of the incorrect size. Fix this by ensuring that the actually allocated size always fits into an unsigned. (This entails erroring out in case the user requested more than UINT_MAX.) Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/exrenc: add av_cold to some functionsPaul B Mahol2022-07-06
|
* avcodec/nvenc: add support for additional (10 bit) RGB pixel formatsTimo Rothenpieler2022-07-05
|
* )hwcontext: add a stub implementation for Vulkan functionsLynne2022-07-05
|
* avformat/mov: prevent potential use of uninitialized valueMartijn van Beurden2022-07-05
|
* avformat/cafdec: Implement FLAC-in-CAF parsingMartijn van Beurden2022-07-05
| | | | | | | | The afconvert utility shipped with MacOS supports muxing of FLAC in CAF, see afconvert help output on a recent Mac here: https://hydrogenaud.io/index.php?topic=122509.0 A file created with afconvert free of copyright (licensed CC0) can be found here: http://www.audiograaf.nl/misc_stuff/afconvert-FLAC-in-CAF.caf
* avfilter/xstack: Add support for fixed size gridVignesh Venkatasubramanian2022-07-04
| | | | | | | | | | | | Add a short hand parameter for making a fixed size grid. The existing xstack layout parameter syntax gets tedious if all one wants is a matrix like grid of the input streams. Add a grid option to the xstack filter that simplifies this use case by simply specifying the number of rows and columns instead of specific x/y co-ordinate for each stream. Also updating the filter documentation to explain the new option. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
* Revert "avutil/channel_layout: av_channel_layout_describe_bprint: Check for ↵James Almer2022-07-04
| | | | | | | | | | | | buffer end" The doxy for av_channel_layout_describe() states that the user should look at the return value to check if the string was truncated. Returning an error code in this scenario goes against this and is an API break. A proper fix for the timeout was applied to the Matroska demuxer in 94901a9518. This reverts commit 8154cb7c2ff2afcb1a0842de8c215b7714c814d0.
* avformat/matroskadec: fix setting channel layout using the Channels elementJames Almer2022-07-04
| | | | | | | | | | | | | | If the stream's channel layout is first set into a native layout using codec private parameters, this code here could potentially result in an invalid native layout where popcnt(ch_layout.u.mask) != ch_layout.nb_channels being propagated. Fixes: Timeout printing a billion channels Fixes: 48099/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-6754782204788736 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* get_bits: move check_marker() to mpegvideodec.hAnton Khirnov2022-07-04
| | | | | It is only used by mpegvideo-based decoders - specifically mpeg12, intelh263, ituh263, mpeg4video.
* avcodec/mscc: Don't modify input packetAndreas Rheinhardt2022-07-04
| | | | | | | This packet may not be writable, hence we must not write to it. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/decoders: Use const uint8_t* to access input packet dataAndreas Rheinhardt2022-07-04
| | | | | | | These packets need not be writable, so we must not modify them. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dcadec: Treat the input packet's data as constAndreas Rheinhardt2022-07-04
| | | | | | | | A decoder's input packet need not be writable, so we must not modify the data. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/(mpeg|mpegts|mxf|sup)enc: Use const uint8_t* to access pkt dataAndreas Rheinhardt2022-07-04
| | | | | | | | | The packets muxers receive are not guaranteed to be writable, so they must not be modified. Ergo only access the packet's data via a const uint8_t*. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>