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

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>
This commit is contained in:
Marton Balint
2025-06-22 20:48:09 +02:00
parent 4440e499ba
commit 44546751db

View File

@ -1288,6 +1288,10 @@ static int filter_activate_default(AVFilterContext *filter)
if (li->frame_wanted_out)
return request_frame_to_filter(filter->outputs[i]);
}
if (!filter->nb_outputs) {
ff_inlink_request_frame(filter->inputs[0]);
return 0;
}
return FFERROR_NOT_READY;
}
@ -1427,6 +1431,11 @@ static int filter_activate_default(AVFilterContext *filter)
Rationale: 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 output.
- Request a frame on the input for sinks.
Rationale: sinks using the old api have no way to request a frame on their
input, so we need to do it for them.
*/
int ff_filter_activate(AVFilterContext *filter)