[FFmpeg-devel] [PATCH] hw_base_encode: Support refs option to limit number of references

2025-06-24 Thread David Rosca
--- libavcodec/hw_base_encode.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/hw_base_encode.c b/libavcodec/hw_base_encode.c index 33a30c8d10..927aeb4bad 100644 --- a/libavcodec/hw_base_encode.c +++ b/libavcodec/hw_base_encode.c @@ -666,6 +666,11 @@ int ff_hw_base_init_gop_st

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: at EOF, unref frame used for FPS conversion logic

2025-06-24 Thread Steven Zhou
> >>> On Jun 24, 2025, at 11:09, Steven Zhou wrote: > >>> > >>> fftools/ffmpeg_filter: at EOF, unref frame used for FPS conversion > >>> logic > >>> > >>> Ever since commit 64f3feb added > >>> `avcodec_free_context(&enc->enc_ctx);` > >>> to `enc_free()` the encoder context is closed before filterg

[FFmpeg-devel] [PATCH] libavutil: fix memory leak of drmVersion

2025-06-24 Thread Tim Blechmann via ffmpeg-devel
--- Begin Message --- address sanitizer showed some leaks of drmVersion structs. `vaapi_device_create` did not call drmFreeVersion in all possible code paths. Signed-off-by: Tim Blechmann --- libavutil/hwcontext_vaapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/hwcontext_

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread softworkz .
> -Original Message- > From: ffmpeg-devel On Behalf Of compn > Sent: Dienstag, 24. Juni 2025 08:00 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json" > > On Mon, 23 Jun 2025 21:20:56 +0100, Derek Buitenhuis wrote: > > > This was pushed with out

[FFmpeg-devel] [PATCH v2 1/2] avfilter: add scale_d3d11 filter

2025-06-24 Thread Dash Santosh Sathyanarayanan
This commit introduces a new hardware-accelerated video filter, scale_d3d11, which performs scaling and format conversion using Direct3D 11. The filter enables efficient GPU-based scaling and pixel format conversion (p010 to nv12), reducing CPU overhead and latency in video pipelines. > +

Re: [FFmpeg-devel] [PATCH 2/4] avfilter/asrc_sinc: fix leak in config_input()

2025-06-24 Thread ld y
Michael Niedermayer writes: > doesnt the failure path here need the free too ? > int ret = fir_to_phase(s, &h[longer], &n, &post_peak, s->phase); > if (ret < 0) > return ret; > I checked fir_to_phase() and found that the only place it allocates memory in h[longer] is

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Kieran Kunhya via ffmpeg-devel
--- Begin Message --- On Wed, 25 Jun 2025, 02:09 compn, wrote: > On Tue, 24 Jun 2025 10:22:26 +0200, Kieran Kunhya via ffmpeg-devel > wrote: > > > On Tue, 24 Jun 2025, 09:28 compn, wrote: > > > > > On Tue, 24 Jun 2025 07:48:30 +0100, Kieran Kunhya via ffmpeg-devel > > > wrote: > > > > > > > On T

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread compn
On Tue, 24 Jun 2025 10:22:26 +0200, Kieran Kunhya via ffmpeg-devel wrote: > On Tue, 24 Jun 2025, 09:28 compn, wrote: > > > On Tue, 24 Jun 2025 07:48:30 +0100, Kieran Kunhya via ffmpeg-devel > > wrote: > > > > > On Tue, 24 Jun 2025, 07:00 compn, wrote: > > > > > > > On Mon, 23 Jun 2025 21:20

Re: [FFmpeg-devel] [PATCH] avformat/demux: Fix segfault due to avcodec_open2 failure (v2)

2025-06-24 Thread Pavel Koshevoy
If I don't hear any objections in the next 72 hours I will apply this at that time, or later if I forget. Pavel. On Mon, Jun 23, 2025 at 2:37 PM Pavel Koshevoy wrote: > ping ... as this is a segfault fix for `ffplay/ffprobe -i 1_poc.mp4` I > think it deserves some review/approval priority. > >

[FFmpeg-devel] [PATCH 05/12] avfilter/avfilter: always forward request frame in filter_activate_default

2025-06-24 Thread Marton Balint
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 --- libavfilter/avfilter.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavfilter/avfilter.c b/libavf

[FFmpeg-devel] [PATCH 2/2] avformat/tee: fix multiple bsfs in tee

2025-06-24 Thread Marvin Scholz
Since 155508c6e925f4f2f5e77087a7e1925b3de735ff specifying multiple bsfs for different streams was broken: "[bsfs/a=h264_metadata:bsfs/v=h264_metadata]out.mp4|..." This incorrectly only parsed the first bsfs specification. The reason for this is that the dictionary is modified in the iterator, hen

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Vittorio Giovara
> On Jun 24, 2025, at 10:53 AM, Michael Niedermayer > wrote: > > Hi Derek > > so many different subjects you raise here, ill try to reply seperately > to keep it clean and terse > >> On Tue, Jun 24, 2025 at 06:24:32AM +0100, Derek Buitenhuis wrote: >> Hi, >> >> On Monday, June 23, 2025, Mic

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Kieran Kunhya via ffmpeg-devel
--- Begin Message --- On Tue, Jun 24, 2025 at 8:48 AM Kieran Kunhya wrote: > > > > On Tue, 24 Jun 2025, 07:00 compn, wrote: >> >> On Mon, 23 Jun 2025 21:20:56 +0100, Derek Buitenhuis wrote: >> >> > This was pushed with outstanding reservations, with no positive >> > affirmation or review from any

[FFmpeg-devel] [PATCH 1/2] avformat/tee: refactor option processing

2025-06-24 Thread Marvin Scholz
Instead of the convoluted nested macros, use a convenience helper function. While this makes the code slightly longer, it is now much clearer what is happening without running the file through a preprocessor first. Additionally do not mess with the internals of the dictionary, just to save two str

Re: [FFmpeg-devel] [PATCH 1/5] avformat/mov: Check that sample_count is allocated in mov_parse_heif_items()

2025-06-24 Thread Michael Niedermayer
On Mon, Jun 23, 2025 at 11:43:04AM -0300, James Almer wrote: > On 6/21/2025 6:15 PM, Michael Niedermayer wrote: > > Fixes: NULL pointer dereference > > Fixes: > > 416811958/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5425269114732544 > > > > Found-by: continuous fuzzing process > > http

[FFmpeg-devel] [PATCH 08/12] avfilter: signal an empty buffersrc with an explicit activate error code

2025-06-24 Thread Marton Balint
No change in functionality. Signed-off-by: Marton Balint --- libavfilter/avfiltergraph.c | 2 ++ libavfilter/buffersink.c| 5 - libavfilter/buffersrc.c | 4 ++-- libavfilter/filters.h | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libavfilter/avfiltergrap

[FFmpeg-devel] [PATCH 11/12] fftools/ffmpeg_filter: always reap all available frames before requesting new ones

2025-06-24 Thread Marton Balint
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 --- fftools/ffmpeg_filter.c | 31 --

[FFmpeg-devel] [PATCH 04/12] fate/filter-video: add ffprobe test for dual output select filter

2025-06-24 Thread Marton Balint
Signed-off-by: Marton Balint --- tests/fate-run.sh| 4 tests/fate/filter-video.mak | 3 +++ tests/ref/fate/filter-select-ffprobe | 25 + 3 files changed, 32 insertions(+) create mode 100644 tests/ref/fate/filter-select-ffprobe diff --g

[FFmpeg-devel] [PATCH 1/3] lavf/rtpdec: fix RTCP SR packet length check

2025-06-24 Thread Marvin Scholz
The minimum valid packet length is 28, given that the length includes the packet header. This didn't cause any issues so far as the code did not care about the last two fields in the SR section, but will be relevant in a future commit. --- libavformat/rtpdec.c | 2 +- 1 file changed, 1 insertion(

Re: [FFmpeg-devel] [PATCH 2/4] avfilter/asrc_sinc: fix leak in config_input()

2025-06-24 Thread Michael Niedermayer
Hi On Mon, Jun 23, 2025 at 08:48:05PM +0800, ld y wrote: > Michael Niedermayer writes: > > > does the other return in config_output() not need this free too? > > > > I believe all the other return behind fir_to_phase() has called > av_free(h[longer]) > already. I would love to add this message

Re: [FFmpeg-devel] [PATCH 4/4] avformat/sapenc: fix leak in sap_write_header()

2025-06-24 Thread Michael Niedermayer
On Mon, Jun 23, 2025 at 08:54:24PM +0800, ld y wrote: > Michael Niedermayer writes: > > > this can be factored like: > > > > like > > +ret = 0; > > fail: > > +for (i = 0; i < s->nb_streams; i++) > > +if (contexts[i]) > > +av_free(contexts[i]->url); > > av_free

[FFmpeg-devel] [PATCH 2/3] lavf: add and use AVRTCPSenderReport struct

2025-06-24 Thread Marvin Scholz
This will be used in a future commit to expose the SR as side-data. --- libavcodec/defs.h | 14 ++ libavformat/rtpdec.c | 34 -- libavformat/rtpdec.h | 4 ++-- libavformat/rtspdec.c | 2 +- 4 files changed, 37 insertions(+), 17 deletions(-) diff

[FFmpeg-devel] [PATCH 2/2] avformat/rtsp: add TLS options

2025-06-24 Thread Marvin Scholz
From: Daniel N Pettersson Add TLS options to RTSP for when TLS is used for the lower protocol. Signed-off-by: Marvin Scholz Co-authored-by: Marvin Scholz --- libavformat/rtsp.c | 26 +- libavformat/rtsp.h | 11 +++ 2 files changed, 36 insertions(+), 1 deletion(

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Michael Niedermayer
Hi Derek so many different subjects you raise here, ill try to reply seperately to keep it clean and terse On Tue, Jun 24, 2025 at 06:24:32AM +0100, Derek Buitenhuis wrote: > Hi, > > On Monday, June 23, 2025, Michael Niedermayer [...] > > On Mon, Jun 23, 2025 at 09:20:56PM +0100, Derek Buitenhu

[FFmpeg-devel] [PATCH 12/12] avfilter/ffmpeg_filter: rate control all filter graphs

2025-06-24 Thread Marton Balint
It was never reliable to detect if a filtergraph have sources, because a filter can act as a source only after some time, for example the loop filter. So it is better to remove the source detection entirely and always give the scheduler an oppurtunity to stop processing. Fixes ticket #11604. Sig

[FFmpeg-devel] [PATCH 10/12] avfilter/f_select: port to activate

2025-06-24 Thread Marton Balint
Multi-input or multi-output filters should use activate now. Signed-off-by: Marton Balint --- libavfilter/f_select.c | 45 -- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index aa374c6ad0..

[FFmpeg-devel] [PATCH 1/2] avformat/tls: move common client options into their own define

2025-06-24 Thread Marvin Scholz
Used in a future commit to not duplicate options. --- libavformat/tls.h | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavformat/tls.h b/libavformat/tls.h index 2f381acc04..c1d2e21508 100644 --- a/libavformat/tls.h +++ b/libavformat/tls.h @@ -80,20 +80,24 @@ typed

[FFmpeg-devel] [PATCH 09/12] avfilter/buffersink: keep requesting frames if one activation of the graph does not provide one

2025-06-24 Thread Marton Balint
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

[FFmpeg-devel] [PATCH 07/12] tests/fate/filter-audio: add anullsink test

2025-06-24 Thread Marton Balint
Tests ticket #11624 with a slight modification. Signed-off-by: Marton Balint --- tests/fate/filter-audio.mak | 3 +++ tests/ref/fate/filter-anullsink | 6 ++ 2 files changed, 9 insertions(+) create mode 100644 tests/ref/fate/filter-anullsink diff --git a/tests/fate/filter-audio.mak b/t

[FFmpeg-devel] [PATCH 06/12] avfilter/avfilter: make filter_activate_default request frames on behalf of sinks

2025-06-24 Thread Marton Balint
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 --- libavfilter/avfilter.c | 9 + 1 file changed,

[FFmpeg-devel] [PATCH 03/12] avfilter/avfilter: fix forwarding EOF for simple API filters in filter_activate_default

2025-06-24 Thread Marton Balint
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 d9e41ead82263e96ebd14d4d88d6e7f858dd944c. Fixes ticket #10959. Fixes ticket #11366. Signed-off-by: Marton Balint --- liba

[FFmpeg-devel] [PATCH 02/12] avfilter/filters: simplify FF_FILTER_FORWARD_WANTED_ANY

2025-06-24 Thread Marton Balint
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 --- libavfilter/filters.h | 4 +--- 1 file changed, 1 insertion(+), 3 delet

[FFmpeg-devel] [PATCH 01/12] avfilter: factorize requesting an input frame from multi output filters

2025-06-24 Thread Marton Balint
Signed-off-by: Marton Balint --- doc/filter_design.txt | 1 + libavfilter/af_acrossover.c| 10 +- libavfilter/af_channelsplit.c | 10 +- libavfilter/filters.h | 15 +++ libavfilter/split.c| 10 +- libavfilter/vf_extractplanes

[FFmpeg-devel] [PATCH 3/3] lavf: add AV_PKT_DATA_RTCP_SR side data type

2025-06-24 Thread Marvin Scholz
--- libavcodec/packet.c | 1 + libavcodec/packet.h | 6 ++ libavformat/rtpdec.c | 18 ++ 3 files changed, 25 insertions(+) diff --git a/libavcodec/packet.c b/libavcodec/packet.c index 5104eb98b1..2aace71c7d 100644 --- a/libavcodec/packet.c +++ b/libavcodec/packet.c @@ -308

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Michael Niedermayer
Hi Derek On Tue, Jun 24, 2025 at 06:24:32AM +0100, Derek Buitenhuis wrote: > On Monday, June 23, 2025, Michael Niedermayer [...] > > The wallet can be handed over to the SPI treassurer, if the SPI treassurer > > accepts it. > > > Did you consult SPI? There are long discussions between me and S

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Kieran Kunhya via ffmpeg-devel
--- Begin Message --- On Tue, Jun 24, 2025 at 4:53 PM Michael Niedermayer wrote: > > Hi Derek > > so many different subjects you raise here, ill try to reply seperately > to keep it clean and terse > > On Tue, Jun 24, 2025 at 06:24:32AM +0100, Derek Buitenhuis wrote: > > Hi, > > > > On Monday, Jun

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Derek Buitenhuis
Hi, On Monday, June 23, 2025, Michael Niedermayer wrote: > Hi Derek > > You said > "The only mails you'll see from me in the future are code or reviews." Perhaps I should have written "patches or reviews". Nice way of inserting a "fuck you", though. Appreciate it. > > On Mon, Jun 23, 2025 at

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Vittorio Giovara
On Mon, Jun 23, 2025 at 9:12 PM Michael Niedermayer wrote: > The General Assembly was informed about the donation on the 9th june > and on the 18th about the solution with the json file > as well as my intend to implement this within 48h > that would be the 20th. i waited 3 more days both for mem

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread compn
On Tue, 24 Jun 2025 07:48:30 +0100, Kieran Kunhya via ffmpeg-devel wrote: > On Tue, 24 Jun 2025, 07:00 compn, wrote: > > > On Mon, 23 Jun 2025 21:20:56 +0100, Derek Buitenhuis wrote: > > > > > This was pushed with outstanding reservations, with no positive > > > affirmation or review from any

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: at EOF, unref frame used for FPS conversion logic

2025-06-24 Thread Steven Zhou
> -Original Message- > From: ffmpeg-devel On Behalf Of Zhao > Zhili > Sent: Monday, June 23, 2025 8:34 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: at EOF, unref frame > used for FPS conversion logic >

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread compn
On Mon, 23 Jun 2025 21:20:56 +0100, Derek Buitenhuis wrote: > This was pushed with outstanding reservations, with no positive > affirmation or review from any other devs, and without a push noticed > to say it was going to be pushed. > > Further, the wallet is controlled by a single individual, a

Re: [FFmpeg-devel] [PATCH] Revert "Add FUNDING.json"

2025-06-24 Thread Kieran Kunhya via ffmpeg-devel
--- Begin Message --- On Tue, 24 Jun 2025, 07:00 compn, wrote: > On Mon, 23 Jun 2025 21:20:56 +0100, Derek Buitenhuis wrote: > > > This was pushed with outstanding reservations, with no positive > > affirmation or review from any other devs, and without a push noticed > > to say it was going to b