[FFmpeg-devel] [PATCH 4/7] avfilter/avfilter: simplify processing sinks without activate callback
Marton Balint
cus at passwd.hu
Sat Jun 21 20:37:46 EEST 2025
On Tue, 17 Jun 2025, Marton Balint wrote:
>
>
> On Tue, 17 Jun 2025, Andreas Rheinhardt wrote:
>
>> Marton Balint:
>>>
>>>
>>> On Tue, 17 Jun 2025, Andreas Rheinhardt wrote:
>>>
>>>> Marton Balint:
>>>>> Sinks without an activate callback (nullsink, anullsink) could cause
>>>>> AVERROR(EAGAIN)-s in avfilter_graph_request_oldest() even when all
>>>>> the filter
>>>>> graphs inputs were in EOF state.
>>>>>
>>>>> Fixes ticket #11624.
>>>>> Fixes ticket #10988.
>>>>> Fixes ticket #10990.
>>>>>
>>>>> Signed-off-by: Marton Balint <cus at passwd.hu>
>>>>> ---
>>>>> libavfilter/avfiltergraph.c | 38 ++++++++++++++++++-------------------
>>>>> 1 file changed, 18 insertions(+), 20 deletions(-)
>>>>>
>>>>> diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
>>>>> index 2d6036df74..6f9f46f1ea 100644
>>>>> --- a/libavfilter/avfiltergraph.c
>>>>> +++ b/libavfilter/avfiltergraph.c
>>>>> @@ -1423,12 +1423,26 @@ void
>>>>> ff_avfilter_graph_update_heap(AVFilterGraph *graph,
>>>>> FilterLinkInternal *li)
>>>>> heap_bubble_down(graphi, li, li->age_index);
>>>>> }
>>>>>
>>>>> +static int process_legacy_sink_output(FilterLinkInternal *oldesti)
>>>>
>>>> Why is considered legacy (instead of being just a different API)?
>>>>
>>>
>>> The documentation calls it legacy:
>>>
>>> doc/filtering_design:
>>>
>>> "The design using filter_frame() and request_frame() is legacy, but it is
>>> suitable for filters that have a single input and process one frame at a
>>> time."
>>>
>>> avfilter/avfilter.c:
>>>
>>> "In order to activate a filter implementing the legacy filter_frame()
>>> and request_frame() methods, perform the first possible of the following
>>> actions:"
>>>
>>> But if you have another name in mind for this, I can change it.
>>>
>> Why not just call it the "simple" API?
>
> Ok, changed locally the function name to process_simple_api_sink().
I withdraw this patch for now, because I am no longer sure this is the
proper fix. I will apply the rest of patches in the series, except the
f_select port to activate. I will resubmit that later in another patch
series.
Regards,
Marton
More information about the ffmpeg-devel
mailing list