Ted Meyer
86f53f9ffb
avformat/mov: do not allocate out-of-range buffers
...
There's a possibility here with a well-crafted MP4 file containing only
the nested boxes in order: MOOV.TRAK.MDIA.MINF.STBL.SDTP where the
header size uses the 64 bit large size, and the ending stdp box has some
size value >= 0x100000014.
On a 32 bit build of ffmpeg, av_malloc's size parameter drops the high
order bits of `entries`, and and the allocation is now a controlled size
that is significantly smaller than `entries`. The following loop will
then write off the ended of allocated memory with data that follows the
box fourcc.
2026-03-13 21:53:12 +01:00
Zhao Zhili
f189657ec6
avformat/rtmpproto: fix listen_timeout conversion for special negative values
...
rtmpproto converts listen_timeout to milliseconds by multiplying it
by 1000 before passing it to TCP. However, negative values are special
sentinels (e.g., -1 for infinite wait) and should not be multiplied.
This worked prior to commit 49c6e6cc44 because there was no range
validation. Since that commit, ff_parse_opts_from_query_string
validates option values against their declared ranges, causing these
multiplied negative values to fail.
Fixes ticket #22469 .
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2026-03-13 11:38:39 +00:00
Michael Niedermayer
4ccad70d57
avformat/hxvs: Do not allow backward steps in hxvs_probe()
...
Fixes: infinite loop
Fixes: 487632033/clusterfuzz-testcase-minimized-ffmpeg_dem_IMAGE2_fuzzer-4565877872984064
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-13 04:39:35 +01:00
Nicolas Gaullier
afcde6551c
avformat/mov: fix skip_samples when sample_rate and time_base do not match
...
Fixes #21076 .
2026-03-12 12:42:06 +00:00
Michael Niedermayer
ba0f8083fd
avformat/aiffdec: Check for partial read
...
Fixes: read of uninitialized memory
Fixes: 490305404/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6406386140643328
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-11 20:06:26 +00:00
Andreas Rheinhardt
ba57a33351
avformat/id3v2: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
90dae166b5
avformat/http: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
8ddb82fd75
avformat/lafdec: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
1617feef50
avformat/asfdec_f: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
2ed4660960
avformat/rtpenc_mpegts: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
6de2565b8e
avformat/rtpdec_xiph: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
422ad600cd
avformat/oggparseopus: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
615d5c2715
avformat/dsfdec: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
1e440f2745
avformat/dovi_isom: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
9c0f942293
avformat/aviobuf: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
1778991846
avformat/avio: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
5962ca0c20
avformat/avidec: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
8f9239a869
avformat/mpc8: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
378928e79f
avformat/mpegtsenc: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
968511ad03
avformat/dhav: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
a49eed2fb1
avformat/oggenc: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
4014d35dda
avformat/bonk: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
5198d8802c
avformat/matroskadec: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
fd88a52be0
avformat/matroskaenc: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
7a0ae45bcf
avformat/rmenc: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
6aa367b9b3
avformat/smacker: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
54672d194c
avformat/srtpproto: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
b53752dc4c
avformat/tcp: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
619839ac16
avformat/tee: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
034b37a51d
avformat/vividas: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
a2a42aa404
avformat/vorbiscomment: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
0037c5abdd
avformat/webpenc: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
61c22c71c2
avformat/yuv4mpegdec: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
33971e6c4e
avformat/apetag: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Andreas Rheinhardt
6a78db80f0
avformat/hlsenc: Fix shadowing
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2026-03-10 13:52:18 +01:00
Aditya Banavi
31c2f814ca
avformat/tls_gnutls: fix DTLS handshake failure in some WebRTC cases
...
The early code may encounter handshake failure when publish
WHIP to some server.
See RFC 8827 section 6.5:
All implementations MUST support DTLS 1.2 with the
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 cipher suite
and the P-256 curve.
So this patch uses the specific curve to avoid incompatibility.
Signed-off-by: Aditya Banavi <adityabanavi@gmail.com >
2026-03-09 03:11:04 +00:00
Romain Beauxis
e5e8efae5c
libavformat/mov.c: Fix seek in fragmented mp4 files where the audio and video streams are written to seperate fragments
2026-03-08 16:22:24 -05:00
Michael Niedermayer
c1263a3dd9
Bump versions for master after release/8.1
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-08 02:31:23 +01:00
Michael Niedermayer
67c886222f
Bump versions for release/8.1
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-08 02:29:20 +01:00
James Almer
ebf70aa854
avformat/demux: update Stream Groups in avformat_find_stream_info() from parsed values
...
Dimensions are not available at the container level for LCEVC in mpegts, so derive them
from the parsed values taken from the enhancement stream.
Signed-off-by: James Almer <jamrial@gmail.com >
2026-03-07 19:22:42 -03:00
James Almer
b9cb948ec1
avformat/mpegts: add support for LCEVC streams
...
As defined in ITU-T H.222.0 v9, LCEVC streams use the "Byte stream format"
defined in Annex B of ISO/IEC 23094-2:2021.
Signed-off-by: James Almer <jamrial@gmail.com >
2026-03-07 19:22:42 -03:00
James Almer
58052b484e
avcodec/codec_desc: make LCEVC a video media type
...
Every container signals it as such, and the data media stream type is too
undefined and unsupported across the codebase that even if no standalone
decoder can be present for it, it's preferable to it.
This is technically an API break, but LCEVC support has been minimal until
now so it should be safe.
Signed-off-by: James Almer <jamrial@gmail.com >
2026-03-07 19:22:14 -03:00
Devraj Ajmera
4a390fcd20
avformat/rtpenc: validate MPEG-TS RTP payload size
...
Ensure that the RTP payload size is at least one TS packet
(188 bytes) when packetizing MPEG-TS.
Previously, small payload sizes were silently rounded up,
which could lead to incorrect behavior. Return EINVAL
with a clear error message instead.
Signed-off-by: Devraj Ajmera <devrajajmera077@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-07 12:17:27 +01:00
Michael Niedermayer
6023ad715c
avformat/mlvdec: avoid uninitialized read in read_string()
...
Fixes: read of uninitialized memory
Fixes: 488256339/clusterfuzz-testcase-minimized-ffmpeg_dem_MLV_fuzzer-6347338118660096
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-06 23:32:22 +01:00
Michael Niedermayer
987d13d13c
avformat/avformat: Fix warning: assignment discards const qualifier from pointer target type
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-06 15:59:20 +01:00
Michael Niedermayer
ea9e85e549
avformat/rtsp: Explicitly check protocol
...
Fixes: redirect to non rtsp protocol
Fixes: YWH-PGM40646-41
Found-by: BapToutatis
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-06 03:37:19 +01:00
Michael Niedermayer
88eb772900
avformat/rtsp: Pass blacklist
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-06 03:37:19 +01:00
Michael Niedermayer
2326bc5f69
avformat/rtsp: Use ff_format_check_set_url()
...
Fixes: redirect to blacklisted protocol
Fixes: YWH-PGM40646-41
Found-by: BapToutatis
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-06 03:37:19 +01:00
Michael Niedermayer
394a7ff8ce
avformat: Add ff_format_check_set_url()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2026-03-06 03:37:18 +01:00
James Almer
77298c29bc
avformat/mov: check return value of mov_read_iref_cdsc()
...
Signed-off-by: James Almer <jamrial@gmail.com >
2026-03-05 09:57:28 -03:00