1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00
Commit Graph

120329 Commits

Author SHA1 Message Date
a0cf4c7d2d fate/demux: fix multiple dependencies
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-05 21:10:43 +02:00
9f7e9d5e7e fate/all: add missing dependencies for extradata bsf
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-05 21:10:43 +02:00
0ab09a6b8f tests/Makefile: make easier to check for multiple dependencies
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-05 21:10:43 +02:00
a4a71b5e9d avfilter/asrc_sinc: fix leak in config_input()
In config_input(), fir_to_phase() allocates memory in h[longer], which
would leak if av_calloc() to s->coeffs failed. lpf() allocates memory
in h[0] and h[1], which would leak if fir_to_phase() failed. To fix
this leak, add av_free(h[longer]) in as cleanup code, and replace
return AVERROR* with goto cleanup to prevent from leaks.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-05 21:10:36 +02:00
5f62e2de98 fftools/cmdutils: don't try to load arguments from file if not needed
CLI option parser checks if argument exists when needed, but in this
case only OPT_TYPE_BOOL where checked, so OPT_TYPE_FUNC without argument
where trying to load a file from `arg` which is NULL in this case.

Fixes crash on `ffmpeg -/version`

Fixes: 6d17991b7e
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-05 21:05:56 +02:00
30043cc167 avformat/mov: allowing custom udta atoms to pass through their values correctly when export_all option specified.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-05 21:05:56 +02:00
3b6ec5abb5 avcodec/opus: don't materialize buf pointer from null
Fixes: avcodec/opus/dec.c: runtime error: applying non-zero offset 10 to null pointer

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-05 21:05:39 +02:00
05094c1749 fftools/textformat: remove unreachable code in tf_mermaid
Integer writing is impossible here as the first branch was dead code,
so remove it completely.

Fix CID 1646948

Reviewed-by: softworkz <softworkz@hotmail.com>
2025-07-05 02:35:00 +02:00
bf5f3f1f2e avcodec/nvdec: fix 10bit output pixel formats
Fixes #11655
2025-07-04 17:20:57 +02:00
0fe9f25e76 avcodec/adpcm: Sanyo LD-ADPCM decoder 2025-07-04 17:07:53 +10:00
ad0a44028d avfilter: add pad_cuda filter
This patch adds the pad_cuda video filter. A filter similar to the existing pad filter but accelerated by CUDA.

The filter shares the same options as the software pad filter.

Example usage:
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -vf "pad_cuda=w=iw+100:h=ih+100:x=-1:y=-1:color=red" out.mp4

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2025-07-04 01:32:27 +02:00
ecbe3e7366 avcodec/rv60dec: Check ofs for overflows
Fixes: signed integer overflow: 30 + 2147483647 cannot be represented in type 'int'
Fixes: 418335931/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV60_fuzzer-6568264620900352

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-03 23:05:31 +02:00
e68599f551 avformat/rtpdec_asf: fix leak in ff_wms_parse_sdp_a_line()
In ff_wms_parse_sdp_a_line(), it allocates memory in buf, but doesn't
free buf when avformat_alloc_context() failed. Add av_free(buf) before
return to prevent from leak.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-03 23:05:27 +02:00
98afcd3da7 avcodec/sunrast: fix leak in sunrast_decode_frame()
In sunrast_decode_frame(), we use av_malloc_array() allocates memory
to ptr and ptr2. However if buf_end - buf < 1, this function returns
error code without freeing this memory thus cause a leak. Add av_freep()
before return.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-03 23:05:14 +02:00
7ed5a7094f avformat/rtpdec_latm: fix leak in parse_fmtp_config()
av_mallocz() allocates memory in config, but we forget to free it
if init_get_bits() failed. Replace return ret with goto end.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-07-03 23:04:57 +02:00
ba984355fe avformat/whip: fix format string for printing size_t 2025-07-03 22:51:15 +02:00
3f7e0fddee avformat/tls: clean up new whip options 2025-07-03 22:18:10 +02:00
4a4a566d6e avformat/tls: remove unused fingerprint option 2025-07-03 22:18:10 +02:00
043d3fef8a avformat/tls_openssl: use existing context handle 2025-07-03 22:18:10 +02:00
2e72924ad1 avformat/tls: fix udp init 2025-07-03 22:18:10 +02:00
23c70e3740 avformat/udp: don't override 0 localport 2025-07-03 22:18:10 +02:00
492aef2d94 avformat/tls: don't use http_proxy for udp sockets 2025-07-03 22:18:10 +02:00
311742eb5a avformat/tls: use non protocol specific error message 2025-07-03 22:18:10 +02:00
058b226313 avformat/whip: remove redundant WHIP: prefix from all logging 2025-07-03 22:18:10 +02:00
b92130293e avformat/whip: don't leak options dict 2025-07-03 22:18:10 +02:00
8f3ecc9db0 avformat/whip: use av_dict_set_int for int 2025-07-03 22:18:10 +02:00
cdc03240fe avformat/Makefile: don't hardcode openssl for whip muxer 2025-07-03 22:18:10 +02:00
42bcbdd456 fftools/ffmpeg_filter: always reap all available frames before requesting new ones
alfilter_graph_request_oldest() might return EAGAIN and produce a frame on not
the oldest sink.

Fixes ticket #11597.
Fixes excessive frame buffering in #10959.
Fixes excessive frame buffering in #11366.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:54 +02:00
af189e424b avfilter/f_select: port to activate
Multi-input or multi-output filters should use activate now.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:54 +02:00
223c2b03da avfilter/buffersink: keep requesting frames if one activation of the graph does not provide one
A frame graph activation might not produce a frame in the requested sink, so
keep on requesting a frame there unless we encounter a filter activation with
buffersrc empty error.

This makes av_buffersink_get_frame(_flags) work according to its documentation
which claims that EAGAIN is only returned if additional frames must be inserted
into the graph.

Fate changes are because audio frames will have different sizes at segment
boundaries, but content is the same.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:54 +02:00
d41bac1333 avfilter: signal an empty buffersrc with an explicit activate error code
No change in functionality.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:54 +02:00
eea6f0e32e tests/fate/filter-audio: add anullsink test
Tests ticket #11624 with a slight modification.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:54 +02:00
44546751db avfilter/avfilter: make filter_activate_default request frames on behalf of sinks
Sinks without an activate callback have no means to request frames in their
input, therefore the default activate callback should do it for them.

Fixes ticket #11624.
Fixes ticket #10988.
Fixes ticket #10990.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:54 +02:00
4440e499ba avfilter/avfilter: always forward request frame in filter_activate_default
Even if all inputs are blocked an activate callback should request a frame on
some if its inputs if a frame is requested on any of its outputs.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:54 +02:00
a85835bfb8 fate/filter-video: add ffprobe test for dual output select filter
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:54 +02:00
a736ac72bb avfilter/avfilter: fix forwarding EOF for simple API filters in filter_activate_default
EOF only need to be forwarded back if all outputs have reached EOF.

Fixes infinte loop with ffprobe -f lavfi -i "smptebars=d=1,select=n=2:e=1[out0][out1]"
Regression since d9e41ead82.

Fixes ticket #10959.
Fixes ticket #11366.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:53 +02:00
29e696c9c0 avfilter/filters: simplify FF_FILTER_FORWARD_WANTED_ANY
The status check is unneeded because an outlink with a nonzero status should
always return 0 for ff_outlink_frame_wanted(). Also use unsigned for index
because nb_outputs is unsigned as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:53 +02:00
f3b7aa6c22 avfilter: factorize requesting an input frame from multi output filters
Signed-off-by: Marton Balint <cus@passwd.hu>
2025-07-03 21:41:53 +02:00
01ffe103e5 avcodec/rv34: Fix spelling mistake
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:32 +02:00
fa02dea036 avcodec/rv34: Don't report progress unnecessarily
ff_mpv_frame_end() already does it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:32 +02:00
abc54c25be avcodec/mpegvideo: Move loop_filter to {H263Dec,MPVEnc,VC1}Context
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:32 +02:00
60f51bdaac avcodec/mpegvideo: Move partitioned_frame to {H263Dec,MPVEnc}Context
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:32 +02:00
0984724d1e avcodec/mpeg_er: Allow to skip setting partitioned_frame, p[pb]_time
Instead of setting these unconditionally (they are always zero
for H.261, MPEG-1/2, RV30/40, VC-1), add a variant of
ff_mpeg_er_frame_start() that sets them and remove setting them
from ff_mpeg_er_frame_start(). Also pass these values via parameters
instead of reading them from the MPVContext itself.
This will allow to move them from MPVContext.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:31 +02:00
3c06d87c93 avcodec/mpegvideo: Move fields to {H263Dec,MPVEnc}Context when possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:31 +02:00
00ea78f426 avcodec/flvdec: Binarize h263_flv
It used to be a tri-state encoding both whether to use FLV picture
headers and whether to use the FLV way of encoding escape values,
but the former is now unnecessary due to the switch to a function
pointer for reading the header. So binarize h263_flv.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:31 +02:00
532ae5dc7d avcodec/ituh263enc: Inline value of h263_flv
It is always two when we encode FLV1.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:31 +02:00
c660f45f8e avcodec/h263dec: Use function ptr for decode_picture_header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:31 +02:00
3b6d1a6ee1 avcodec/msmpeg4dec: Move ff_msmpeg4_decode_init() down
Will avoid a forward declaration lateron.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:31 +02:00
502a6ea123 avcodec/mpegvideo: Move SLICE_* defs to h263dec.h, h261dec.c
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:31 +02:00
2089d39735 avcodec/mpegvideo: Move mb_skip_run to {RV34Dec,MPVEnc}Context
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-07-03 20:35:31 +02:00