aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
...
* avformat/rtpdec: int overflow in start_time_realtimeJonathan Baudanza2025-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | This was previously adjusted by me in 6b3f9c2e92b. Unfortunately, I traded one integer overflow bug for another. Currently, NTP timestamps that exceed INT64_MAX (~Jan 20, 1968) will cause an overflow when passed to av_rescale. This patch replaces av_rescale, which operates on int64_t, with ff_parse_ntp_time, which operates on uint64_t. This will give the correct values for timestamps back around the NTP epoch and present day timestamps. Fixes ticket #11388. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/iamf_parse: Check output_channel_countMichael Niedermayer2025-01-081-1/+1
| | | | | | | | Fixes: -nan is outside the range of representable values of type 'int' Fixes: 377072730/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6545416570601472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: Check edit_unit for being larger than signed 64bitMichael Niedermayer2025-01-081-0/+2
| | | | | | | | Fixes: signed integer overflow: 2 * -4962931467012268000 cannot be represented in type 'long' Fixes: 376496313/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4921469185884160 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avformat.h: elaborate documentation for avformat_open_input() on ↵Marth642025-01-081-2/+3
| | | | | | error condition Signed-off-by: Marth64 <marth64@proxyid.net>
* avformat/ipfsgateway: fix capitalizaton mistakeNyanMaths2025-01-071-1/+1
| | | | | | | Fix the incorrect capitalization of the project name in a comment. The project is named FFmpeg, not FFMpeg. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avformat/flvdec: initialize ret in flv_read_packet() to AVERROR_BUGJames Almer2025-01-071-1/+2
| | | | | | | | This will ensure any future goto leave that may be added doesn't accidentally forget to set ret to some proper value. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flvdec: don't leak extradata pointer on realloc failureTimo Rothenpieler2025-01-071-9/+13
|
* avformat/flvdec: properly free mt_extradataTimo Rothenpieler2025-01-071-0/+1
|
* avformat/flvenc: fix missing sequence start with MP3 tracksAlessandro Ros2025-01-071-0/+1
| | | | | | | | | | | | | When muxing to FLV/RTMP a MP3 track with an ID greater than zero, enhanced RTMP has to be used, and a sequence start should preceed track data. This is already implemented (see line 823 of flvenc.c) but the code is never reached due to a too-strict condition before it. This patch fixes the issue. Signed-off-by: Alessandro Ros <aler9.dev@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avformat/flvenc: properly handle writing mpeg4 extradataTimo Rothenpieler2025-01-071-1/+5
|
* avformat/flvdec: clean up variable initialization spacingTimo Rothenpieler2025-01-071-2/+2
|
* avformat/flvdec: fix potential premature return on audio MultichannelConfigTimo Rothenpieler2025-01-071-3/+3
|
* avformat/flvdec: add missing track_size decrementTimo Rothenpieler2025-01-071-0/+1
|
* avcodec: deprecate AVCodecContext propertiesMarton Balint2025-01-051-0/+4
| | | | | | | | These properties are unreliable because they depend on the frames decoded so far, users should check directly the presence of the decoded AVFrame side data or AVFrame flags. Signed-off-by: Marton Balint <cus@passwd.hu>
* Revert "avformat/dump: print only the actual streams in a tile grid group"James Almer2025-01-051-4/+8
| | | | | | | Indexes in tile_grid->offsets were fixed in the previous commit, but just in case, make sure to not overread the streams array. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: fix setting tile grid stream offsets when a stream is ↵James Almer2025-01-052-5/+18
| | | | | | | | | | | referenced more than once The amount of tiles does not necessarely need to match the amount of streams referenced in the grid, as there could be duplicates. Don't silently ignore EEXIST return codes from avformat_stream_group_add_stream() and instead store the index of the duplicate stream. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/jpegxl_anim_dec: use new animated JPEG XL codec IDLeo Izen2025-01-031-1/+1
| | | | | | | | A new codec ID has been added to avcodec for animated JPEG XL, so we should use that in the animated JPEG XL demuxer. Reviewed-by: Marth64 <marth64@proxyid.net> Signed-off-by: Leo Izen <leo.izen@gmail.com>
* avformat/dump: print only the actual streams in a tile grid groupJames Almer2025-01-031-2/+2
| | | | | | | | The amount of tiles does not necessarely need to match the amount of streams. Fixes ticket #11389. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flvdec: set Opus sample rateJames Almer2025-01-031-0/+1
| | | | | | Fixes parsing Opus streams when no opus decoder is present. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamfdec: swap back and side streams if both are presentJames Almer2025-01-032-2/+24
| | | | | | | | | | | | Layouts with both pairs (7.1, 7.1.2, etc) in IAMF that follow the definition in ITU-R BS.2051-3 for Systems I and J also follow its ordering. This means side comes before back, which is the inverse of how it's defined in AVChannel. To workaround this without having to use custom order channel layouts, swap the stream ids in the input IAMF structure, so packets for one are mapped to the other. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamf: document the expandable channel layoutsJames Almer2025-01-031-0/+13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamf: use the correct layouts for Sound Systems B and CJames Almer2025-01-032-5/+5
| | | | | | They have the side channels, not back, as defined in ITU-R - BS.2051-3 Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iamf_writer: be more verbose when reporting an input layout is invalidJames Almer2025-01-031-1/+8
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/demux: Check packet durationMichael Niedermayer2025-01-011-1/+1
| | | | | | | | Fixes: signed integer overflow: 24320 + 9223372036854775573 cannot be represented in type 'long' Fixes: 71001/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-5644785744936960 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/jpegxl_anim_dec: clear buffer paddingMichael Niedermayer2025-01-011-1/+1
| | | | | | | | Fixes: use of uninitialized value Fixes: 70992/clusterfuzz-testcase-minimized-ffmpeg_dem_IMAGE2_fuzzer-5735819170611200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: check that buf if completely filledMichael Niedermayer2025-01-011-1/+2
| | | | | | | Fixes: use of uninitialized value Fixes: 70988/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5298245077630976 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: Check that key was read sucessfullMichael Niedermayer2025-01-011-1/+2
| | | | | | | | Fixes: use of uninitialized value Fixes: 70932/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4870202133643264 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: Fix check for negative valuesMichael Niedermayer2024-12-311-1/+1
| | | | | | | | Fixes: signed integer overflow: 10 * -1923267925333400000 cannot be represented in type 'int64_t' (aka 'long') Fixes: 378891963/clusterfuzz-testcase-minimized-fuzzer_loadfile_direct-5714338935013376 Found-by: ossfuzz Reported-by: Kacper Michajlow <kasper93@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mlvdec: Check avio_read()Michael Niedermayer2024-12-311-2/+4
| | | | | | | | | Fixes: use-of-uninitialized-value Fixes: 383170476/clusterfuzz-testcase-minimized-ffmpeg_dem_MLV_fuzzer-4696002884337664 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: Check llen addition for overflowMichael Niedermayer2024-12-311-0/+3
| | | | | | | | Fixes: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long' Fixes: 377971441/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4966030696316928 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: bump version for enhanced flvTimo Rothenpieler2024-12-271-1/+1
|
* avformat/flvdec: propagate av_packet_add_side_data failureTimo Rothenpieler2024-12-271-8/+10
|
* avformat/flvenc: prevent writing legacy codecs into extended video tracksTimo Rothenpieler2024-12-271-1/+14
|
* avformat/rtmpproto: reserve enough space for statusmsgTimo Rothenpieler2024-12-271-1/+1
|
* avformat/flvdec: support all multi-track modesTimo Rothenpieler2024-12-271-261/+310
|
* avformat/flvdec: stop shadowing local variablesTimo Rothenpieler2024-12-271-22/+22
|
* avformat/rtmpproto: add more enhanced rtmp codecsTimo Rothenpieler2024-12-271-1/+8
|
* avformat/flvdec: add support for reading multi track audioTimo Rothenpieler2024-12-271-3/+18
|
* avformat/flvenc: add support for writing multi track audioTimo Rothenpieler2024-12-271-24/+68
|
* avformat/flvdec: parse enhanced rtmp multichannel infoTimo Rothenpieler2024-12-271-16/+25
|
* avformat/flvenc: write enhanced rtmp multichannel info for audio with more ↵Timo Rothenpieler2024-12-271-8/+85
| | | | than two channels
* avformat/flvenc: refactor fourcc writingTimo Rothenpieler2024-12-271-49/+47
|
* avformat/flvdec: add enhanced audio codecsTimo Rothenpieler2024-12-272-11/+116
|
* avformat/flvenc: remove !size check for audio packetsTimo Rothenpieler2024-12-271-7/+0
| | | | | At least flac finishes every stream with an empty side-data only packet, that would trigger an assertion/error were these checks still in place.
* avformat/flvdec: add support for demuxing multi-track FLVDennis Sädtler2024-12-273-63/+211
| | | | | | | | Based on enhanced-rtmp v2 spec published by Veovera: https://veovera.github.io/enhanced-rtmp/docs/enhanced/enhanced-rtmp-v2 Signed-off-by: Dennis Sädtler <dennis@obsproject.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avformat/flvenc: implement support for multi-track videoDennis Sädtler2024-12-272-47/+120
| | | | | | | | | | | | | Based on enhanced-rtmp v2 spec published by Veovera: https://veovera.github.io/enhanced-rtmp/docs/enhanced/enhanced-rtmp-v2 This implementation maintains some backwards compatibility by only writing the track information for track indices > 0. This means that older FFmpeg versions - and possibly other software - can still read the first video track properly and skip over unsupported packets. Signed-off-by: Dennis Sädtler <dennis@obsproject.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avformat/iamf_writer: ensure the stream groups are not emptyJames Almer2024-12-271-0/+8
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/dashdec: reformat and lowercase get_Fragment()Marth642024-12-241-4/+4
| | | | Signed-off-by: Marth64 <marth64@proxyid.net>
* avformat/mov: fix crash when trying to get a fragment time for a ↵Eugene Zemtsov2024-12-241-0/+2
| | | | | | | | non-existing fragment Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Marth64 <marth64@proxyid.net> Signed-off-by: Marth64 <marth64@proxyid.net>
* avformat/mov: dereference pointer after null checkMichael Niedermayer2024-12-241-1/+2
| | | | | | | | Fixes: null pointer dereference Fixes: 383397479/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4776829338058752 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>