summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/mov: Ignore duplicate ftypMichael Niedermayer2023-12-05
| | | | | | Fixes: switch_1080p_720p.mp4 Found-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Fix integer overflow in mov_read_packet().Dale Curtis2023-12-02
| | | | | | | | | Fixes https://crbug.com/1499669: runtime error: signed integer overflow: 9223372036853334272 + 1375731456 cannot be represented in type 'int64_t' (aka 'long') Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: add QOA demuxerPaul B Mahol2023-11-26
|
* Revert "avformat/rtmpproto: Pass rw_timeout to underlying transport protocol"Zhao Zhili2023-11-25
| | | | | | | | | This reverts commit bec6dfcd5c0b59dd6d947ec3074986aeffd525aa. The patch is NOP since ffurl_open_whitelist copy options from parent automatically. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/rtmpproto: Pass rw_timeout to underlying transport protocolZhao Zhili2023-11-22
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/flvenc: add extract_extradata bsf for new video codecsZhao Zhili2023-11-22
| | | | | | | | | When encoders don't support global header like MediaCodec, FLV muxer needs to add extract_extradata bsf automatically. The codec list doesn't include VP9 since it's not supported by extract_extradata. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* apply spelling fixesDiederik de Haas via ffmpeg-devel2023-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix spelling issue as reported by Debian's lintian tool: accomodate -> accommodate addtional -> additional auxillary -> auxiliary bellow -> below betweeen -> between Calulate -> Calculate coefficents -> coefficients Defalt -> Default defaul -> default higer -> higher neccesary -> necessary orignal -> original ouput -> output precison -> precision processsing -> processing substract -> subtract Transfered -> Transferred upto -> up to Also add several of them to the 'common typos' check in patcheck. Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
* lavf/mux: do not apply max_interleave_delta to subtitlesAnton Khirnov2023-11-14
| | | | | | | | | It is common for subtitle streams to have large gaps between packets. When the caller is interleaving packets from multiple files, it can easily happen that two successive subtitle packets trigger this limit, even though no excessive buffering is happening. Should fix #7064
* avformat/hlsenc: Fix name of flag in error messageDave Johansen2023-11-12
| | | | Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: Add CHANNELS to EXT-X-MEDIA for AudioDave Johansen2023-11-12
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: set HTTP options before writing WebVTT HLS playlistsLéon Spaans2023-11-12
| | | | | | | Fixes: Erroneous HTTP POST instead of HTTP PUT for WebVTT HLS variant playlists. Signed-off-by: Léon Spaans <leons@gridpoint.nl> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/mov: Disallow FTYP after streamsMichael Niedermayer2023-11-10
| | | | | | | | Fixes: Assertion !c->fc->nb_streams failed at libavformat/mov.c:7799 Fixes: 63875/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5479178702815232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: LEAD MCMP decoderPeter Ross2023-11-08
| | | | | | | | | Partially fixes ticket #798 Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Peter Ross <pross@xvid.org>
* lavf/smacker: export sample_aspect_ratioAnton Khirnov2023-11-05
| | | | Partially fixes #10617
* avformat/lafdec: Check for 0 parametersMichael Niedermayer2023-11-03
| | | | | | | | | Fixes: Timeout Fixes: 63661/clusterfuzz-testcase-minimized-ffmpeg_dem_LAF_fuzzer-6615365234589696 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Sean McGovern <gseanmcg@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/webpenc: Check seeksAndreas Rheinhardt2023-11-03
| | | | | | Addresses the issue reported in ticket #4609. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mov: Check that is_still_picture_avif has no trak based streamsMichael Niedermayer2023-11-01
| | | | | | | | Fixes: Assertion failure in mov_read_iloc( in mov_read_iloc()) Fixes: 62866/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5282997370486784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/vf_vapoursynth: simplify xyz format checkNiklas Haas2023-10-31
|
* Bump versions after 6.1Michael Niedermayer2023-10-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump versions prior to 6.1Michael Niedermayer2023-10-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rtsp: Use rtsp_st->stream_indexMichael Niedermayer2023-10-27
| | | | | | | | | Fixes: out of array access Fixes: rtpdec_h264.c149/poc Found-by: Hardik Shah of Vehere Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/options: add missing disposition flag to AVStream class optionsJames Almer2023-10-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mxfdec: Check klv offsetMichael Niedermayer2023-10-19
| | | | | | | | | Fixes: Assertion klv_offset >= mxf->run_in failed at libavformat/mxfdec.c:736 Fixes: 62936/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5778404366221312.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <git@haerdin.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/usmdec: do not return 0 when no packet was producedMichael Niedermayer2023-10-16
| | | | | | | | Fixes: Assertion pkt->stream_index < (unsigned)s->nb_streams && "Invalid stream index.\n" failed at libavformat/demux.c:617 Fixes: 62498/clusterfuzz-testcase-minimized-ffmpeg_dem_USM_fuzzer-4734740995112960 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/tmv: Check video chunk sizeMichael Niedermayer2023-10-15
| | | | | | | | | | This check matches the audio chunk check Fixes: Timeout Fixes: 62681/clusterfuzz-testcase-minimized-ffmpeg_dem_TMV_fuzzer-5299107876700160 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/matroskadec, mov: Fix declaration-after-statement warningsAndreas Rheinhardt2023-10-09
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/asfdec_f: Saturate presentation time in markerMichael Niedermayer2023-10-08
| | | | | | | | Fixes: signed integer overflow: -9223372036315799520 - 3873890816 cannot be represented in type 'long' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5009302746431488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/xwma: sanity check bits_per_coded_sampleMichael Niedermayer2023-10-08
| | | | | | | | Fixes: signed integer overflow: 65312 * 524296 cannot be represented in type 'int' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_XWMA_fuzzer-6595971445555200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/matroskadec: Check prebuffered_ns for overflowMichael Niedermayer2023-10-08
| | | | | | | | Fixes: signed integer overflow: 9223372036630775808 + 1000000000 cannot be represented in type 'long' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-5406131992526848 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/wavdec: Check left avio_tell for overflowMichael Niedermayer2023-10-08
| | | | | | | | Fixes: signed integer overflow: 155 + 9223372036854775655 cannot be represented in type 'long' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5364032278495232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/tta: Better totalframes checkMichael Niedermayer2023-10-08
| | | | | | | | Fixes: signed integer overflow: 4 * 740491135 cannot be represented in type 'int' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-6298893367508992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rpl: Check for number_of_chunks overflowMichael Niedermayer2023-10-08
| | | | | | | | Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int32_t' (aka 'int') Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-6086131095830528 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: compute absolute dts difference without overflow in ↵Michael Niedermayer2023-10-08
| | | | | | | | | | mov_find_next_sample() Fixes: signed integer overflow: -9223372036854775808 - 9222726413022000000 cannot be represented in type 'long' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5959420033761280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/jacosubdec: Check timeresMichael Niedermayer2023-10-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/jacosubdec: avoid signed integer overflows in get_shift()Michael Niedermayer2023-10-08
| | | | | | | | Fixes: signed integer overflow: 22014562800 * 934633746 cannot be represented in type 'long' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5189603246866432 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/jacosubdec: Factorize code in get_shift() a bitMichael Niedermayer2023-10-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Disallow more than one meta box for AVIFVignesh Venkatasubramanian via ffmpeg-devel2023-10-08
| | | | | | | | This is not allowed per the spec. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/sbgdec: Check for negative duration or un-representable end ptsMichael Niedermayer2023-10-08
| | | | | | | | | Fixes: signed integer overflow: 9230955872951340 - -9223372036854775808 cannot be represented in type 'long' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6330481893572608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/wavdec: w64: do not error out for broken files if data start is foundPaul B Mahol2023-10-07
| | | | Also attempt to fix invalid block_align value.
* avformat/avformat: use the side data from AVStream.codecparJames Almer2023-10-06
| | | | | | | | | | | | Deprecate AVStream.side_data and its helpers in favor of the AVStream's codecpar.coded_side_data. This will considerably simplify the propagation of global side data to decoders and from encoders. Instead of having to do it inside packets, it will be available during init(). Global and frame specific side data will therefore be distinct. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avs: Check if return code is representableMichael Niedermayer2023-10-03
| | | | | | | | Fixes: leak Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-6738814988320768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/westwood_vqa: Check chunk sizeMichael Niedermayer2023-10-03
| | | | | | | | | | | | the type is also changed to int as it is interpreted as int in av_get_packet() Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-6593408795279360 Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-4613908817903616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/sbgdec: Check for period overflowMichael Niedermayer2023-10-03
| | | | | | | | | Fixes: signed integer overflow: 4481246996173000000 - -4778576820000000000 cannot be represented in type 'long' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-5063670588899328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/concatdec: Check in/outpoint for overflowMichael Niedermayer2023-10-03
| | | | | | | | | Fixes: signed integer overflow: 91542414454000000 - -9154241494546000000 cannot be represented in type 'long' Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-4739147999084544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/gifdec: do not mark as notimestampsAnton Khirnov2023-10-03
| | | | | | | | The demuxer does not set packet timestamps itself after c6b6356635f598b095606cd126f31bc6ab916225 and instead relies on the parser to do it. However, this does not matter from the caller perspective as it still happens inside the demuxer. The demuxer should thus not be flagged as not having timestamps.
* lavf/demux: restrict video parser duration handling to just GIFAnton Khirnov2023-10-03
| | | | | | The parser does not have a timebase associated with it, so in general it makes no sense for it to be exporting durations. Longer-term this should be handled more cleanly with a new parser API.
* avformat/avformat: Deprecate AVFMT_ALLOW_FLUSHAndreas Rheinhardt2023-10-03
| | | | | | | | | | | | | | | It is of no value to the user, because every muxer can always be flushed with a NULL packet. As its documentation shows ("If not set, the muxer will not receive a NULL packet in the write_packet function") it is actually an internal flag that has been publically exposed because there was no internal flags field for output formats for a long time. But now there is and so use it by replacing the public flag with a private one. Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Anton Khirnov <anton@khirnov.net> Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Write default duration for audioAndreas Rheinhardt2023-10-02
| | | | | | | This is easily possible for those codecs with a fixed frame-size (in samples). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Don't create wrong packet durationsAndreas Rheinhardt2023-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | We have to write an explicit BlockDuration element (and use a BlockGroup instead of a SimpleBlock) in case the Track has a DefaultDuration that is inconsistent with the duration of the packet. The matroska-h264-remux test uses a file with coded fields where the duration of a Block is the duration of a field, not of a frame, therefore this patch writes said BlockDuration elements. (When using a BlockGroup, one has to add ReferenceBlock elements to distinguish keyframes from non-keyframes. Unfortunately, the AV1 codec mapping [1] requires us to reference all references and to really use the real references, which requires a lot of effort for basically no gain. When BlockGroups are used with AV1, the created files are most likely invalid, both before and after this patch, but this patch makes this more likely to happen.) [1]: https://github.com/ietf-wg-cellar/matroska-specification/blob/master/codec/av1.md Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aea: fix bitrate for monoPaul B Mahol2023-10-02
|