diff options
author | Marton Balint <cus@passwd.hu> | 2025-06-22 20:48:09 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2025-07-03 21:41:54 +0200 |
commit | 44546751db824002f07cc0b8b2fc62587a5a34b5 (patch) | |
tree | afc3113f50bb2f81131da9f4de7b4d46f5e9f143 /libavfilter/avfilter.c | |
parent | 4440e499bae0235a8f4f4308c45be8f70f29ff2d (diff) | |
download | ffmpeg-44546751db824002f07cc0b8b2fc62587a5a34b5.tar.gz |
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>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index e03dc65fc6..5bcf0b4ef7 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -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) |