Michael Niedermayer
ae81beb351
avcodec/aac/aacdec: Free channel layout
...
Fixes: 371445194/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5981081124274176
Fixes: memleak
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-31 04:56:25 +01:00
James Almer
d1d9b0813a
avcodec/libdav1d: clear the buffered Dav1dData on decoding failure
...
Should ensure avcodec_send_packet() doesn't return EAGAIN in scenarios where it's not
meant to (e.g., ffmpeg_dec.c where avcodec_receive_frame() is called in a loop to drain
all produced frames before trying to submit more packets).
Fixes ticket #11377 .
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2024-12-30 20:38:00 -03:00
Timo Rothenpieler
5f38c82536
avformat: bump version for enhanced flv
2024-12-27 20:24:23 +01:00
Timo Rothenpieler
770f0a2434
avformat/flvdec: propagate av_packet_add_side_data failure
2024-12-27 20:24:23 +01:00
Timo Rothenpieler
741e49c56f
avformat/flvenc: prevent writing legacy codecs into extended video tracks
2024-12-27 20:24:23 +01:00
Timo Rothenpieler
64043d7b18
fate/flvenc: add test for multitrack flv
2024-12-27 20:24:23 +01:00
Timo Rothenpieler
e3836d1d05
avformat/rtmpproto: reserve enough space for statusmsg
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
e2a8ece352
avformat/flvdec: support all multi-track modes
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
da32990e83
avformat/flvdec: stop shadowing local variables
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
f8dc4d94fd
avformat/rtmpproto: add more enhanced rtmp codecs
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
25faaa311a
avformat/flvdec: add support for reading multi track audio
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
bbf1f3cf6f
avformat/flvenc: add support for writing multi track audio
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
67b5fb4b59
avformat/flvdec: parse enhanced rtmp multichannel info
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
3db28fb067
avformat/flvenc: write enhanced rtmp multichannel info for audio with more than two channels
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
63613fe915
avformat/flvenc: refactor fourcc writing
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
2f72dc33ff
avformat/flvdec: add enhanced audio codecs
2024-12-27 20:24:22 +01:00
Timo Rothenpieler
70067c829b
avformat/flvenc: remove !size check for audio packets
...
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.
2024-12-27 20:24:22 +01:00
Dennis Sädtler
466a400b94
avformat/flvdec: add support for demuxing multi-track FLV
...
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 >
2024-12-27 20:24:09 +01:00
Dennis Sädtler
d8d0175d3a
avformat/flvenc: implement support for multi-track video
...
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 >
2024-12-27 20:22:19 +01:00
James Almer
cedd9151f8
avformat/iamf_writer: ensure the stream groups are not empty
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-12-27 16:17:51 -03:00
Niklas Haas
59258fb90e
swscale/utils: lazily allocate XYZ tables on CONFIG_SMALL
...
This has the downside of requiring these tables to be recomputed on every
init, but saves ~270 kB of static data.
Signed-off-by: Niklas Haas <git@haasn.dev >
2024-12-26 20:31:36 +01:00
Niklas Haas
60bfafcd8a
swscale/utils: add return code to fill_xyztables()
...
Needed for lazy allocation of XYZ tables.
Signed-off-by: Niklas Haas <git@haasn.dev >
2024-12-26 20:31:36 +01:00
Niklas Haas
af6d52eec6
swscale: use 16-bit intermediate precision for RGB/XYZ conversion
...
The current logic uses 12-bit linear light math, which is woefully insufficient
and leads to nasty postarization artifacts. This patch simply switches the
internal logic to 16-bit precision.
This raises the memory requirement of these tables from 32 kB to 272 kB.
All relevant FATE tests updated for improved accuracy.
Fixes : #4829
Signed-off-by: Niklas Haas <git@haasn.dev >
Sponsored-by: Sovereign Tech Fund
2024-12-26 20:31:36 +01:00
James Almer
3e6d89cd97
avcodec/cbs_h2645: revert accidental change
...
This was erroneously included in 7e778586e7
.
Reported-by: Zhao Zhili <quinkblack@foxmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2024-12-26 15:46:44 -03:00
Niklas Haas
8cf2d97280
swscale/unscaled: add pal8 -> gbr(a)p special converter
...
Fixes : #9520
Signed-off-by: Niklas Haas <git@haasn.dev >
Sponsored-by: Sovereign Tech Fund
2024-12-26 19:29:18 +01:00
James Almer
7e778586e7
avcodec/libx265: ignore user set alpha x265-param
...
It makes no difference when the input has an alpha plane, and may end up in
crashes or undefined behavior if it doesn't.
Signed-off-by: James Almer <jamrial@gmail.com >
2024-12-26 13:41:28 -03:00
James Almer
6ffbc22b53
doc/ffmpeg.texi: replace use of uncommon unicode characters
...
Addresses ticket #11372
Signed-off-by: James Almer <jamrial@gmail.com >
2024-12-26 13:41:28 -03:00
Gyan Doshi
fe04b93afa
ffmpeg_sched: return better error code
...
The existing code of 'No space left on device' leaves end users confused
since the issue isn't of disk space.
2024-12-26 15:45:00 +05:30
Pradeep Kumar Goudagunta
aa20294b31
fftools/ffmpeg_opt: Fix precedence issue in abs_start_seek calculation
...
This patch corrects a C operator precedence issue in fftools/ffmpeg_opt.c
where the abs_start_seek calculation did not yield the expected result
due to incorrect placement of parentheses.
2024-12-26 15:44:18 +05:30
Marth64
3778b1f6f1
avformat/dashdec: reformat and lowercase get_Fragment()
...
Signed-off-by: Marth64 <marth64@proxyid.net >
2024-12-24 16:36:05 -06:00
Eugene Zemtsov
7c9bde1d0d
avformat/mov: fix crash when trying to get a fragment time for a non-existing fragment
...
Reviewed-by: Dale Curtis <dalecurtis@chromium.org >
Reviewed-by: Marth64 <marth64@proxyid.net >
Signed-off-by: Marth64 <marth64@proxyid.net >
2024-12-24 15:36:30 -06:00
Marth64
8e8260aabf
avcodec/cbs_av1: fix variable shadowing in cbs_av1_split_fragment()
...
header is previously declared as an int argument then
shadowed in the scope of the loop as a AV1RawOBUHeader.
Signed-off-by: Marth64 <marth64@proxyid.net >
2024-12-24 15:36:17 -06:00
Michael Niedermayer
954d55c2a4
avformat/mov: dereference pointer after null check
...
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 >
2024-12-24 02:55:52 +01:00
Michael Niedermayer
9327093079
avcodec/utils: Fix block align overflow for ADPCM_IMA_WAV
...
Fixes: signed integer overflow: 529008646 * 8 cannot be represented in type 'int'
Fixes: 383379145/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-6674045107503104
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:55:52 +01:00
Michael Niedermayer
361d24e6d9
avformat/matroskadec: Check pre_ns for overflow
...
Fixes: signed integer overflow: -3483479120376300096 - 7442323944145700864 cannot be represented in type 'long'
Fixes: 383187489/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-4561470580391936
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:55:51 +01:00
Michael Niedermayer
8f4eb0fe03
tools/target_dec_fuzzer: Adjust threshold for EACMV
...
Fixes: Timeout
Fixes: 382988735/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EACMV_fuzzer-5278721465974784
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:55:51 +01:00
Michael Niedermayer
fe1aeb499b
tools/target_dec_fuzzer: Adjust threshold for SGA
...
Fixes: Timeout
Fixes: 382804863/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SGA_fuzzer-5652795669151744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:55:51 +01:00
Michael Niedermayer
e7230bc503
tools/target_dec_fuzzer: Adjust threshold for MVC1
...
Fixes: Timeout
Fixes: 378231213/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MVC1_fuzzer-6640960500465664
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:55:50 +01:00
Michael Niedermayer
e8c94e31da
avformat/mov: free stream_info when the surrounding array is freed
...
Fixes: memleak
Fixes: 378408474/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5699368121860096
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:55:50 +01:00
Michael Niedermayer
61ff3047c5
avcodec/rv60dec: Check NEXT/LAST availability
...
Fixes: NULL ptr use
Fixes: 378634700/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV60_fuzzer-5008344043028480
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 >
2024-12-24 02:55:50 +01:00
Michael Niedermayer
2336fc44ac
avcodec/rv60dec: Use get_bits_long()
...
Fixes: 378634700/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV60_fuzzer-5008344043028480
Fixes: assertion failure
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 >
2024-12-24 02:55:18 +01:00
Michael Niedermayer
34c06f5284
avcodec/escape130: move get_buffer down
...
This way the (slow) allocation of an image is done after various additional checks
Fixes: Timeout
Fixes: 379418967/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE130_fuzzer-6507383574036480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:46:47 +01:00
Michael Niedermayer
89efc6c97c
tools/target_dec_fuzzer: Adjust Threshold for indeo5
...
Fixes: 379768251/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5981329084186624
Fixes: Timeout
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:46:47 +01:00
Michael Niedermayer
6ba33b50f5
avutil/timecode: Avoid fps overflow in av_timecode_get_smpte_from_framenum()
...
Fix from c94875471e
Found-by: Youngjae Choi <youngjaechoi@korea.ac.kr >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2024-12-24 02:45:13 +01:00
James Almer
f1ddba24a0
avutil/frame: add missing size dependent prop to LCEVC payload side data
...
Signed-off-by: James Almer <jamrial@gmail.com >
2024-12-23 17:39:57 -03:00
Niklas Haas
d23f443dfc
avfilter/vf_lut*: strip color volume metadata
...
These filters, in general, will apply some arbitrary color volume
transformation. Strip corresponding metadata to be conservative/safe.
2024-12-23 14:23:13 +01:00
Niklas Haas
eecdc25d4b
avfilter/vf_colorspace: strip color volume metadata
2024-12-23 14:23:13 +01:00
Niklas Haas
0d468730bc
avfilter/vf_libplacebo: update metadata stripping logic
...
Switches to av_frame_side_data_remove_by_props(), covering a number of
cases that we previously ignored. Additionally, stop stripping metadata
when merely changing colorspace or color range, since these do not
affect the actual color volume of the image data, only the encoding.
2024-12-23 14:23:13 +01:00
Niklas Haas
d1eadc43b9
avfilter/vf_zscale: strip metadata on change
...
Required for both size changes and color volume changes (as a result of
changing primaries/transfer).
2024-12-23 14:23:13 +01:00
Niklas Haas
f22965b882
avfilter/vf_scale*: strip metadata on size change
2024-12-23 14:23:13 +01:00