History

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.

Marton Balint committed 1 year ago

Commit 44546751 parent 4440e491 file · +9 −0Browse files

Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfilter.c+9−0
@@ -1288,6 +1288,10 @@ static int filter_activate_default(AVFilterContext *filter) · 1287 unmodified lines
12881288 if (li->frame_wanted_out)
12891289 return request_frame_to_filter(filter->outputs[i]);
12901290 }
1291+ if (!filter->nb_outputs) {
1292+ ff_inlink_request_frame(filter->inputs[0]);
1293+ return 0;
1294+ }
12911295 return FFERROR_NOT_READY;
12921296 }
12931297
@@ -1427,6 +1431,11 @@ static int filter_activate_default(AVFilterContext *filter) · 133 unmodified lines
14271431 Rationale: even if all inputs are blocked an activate callback should
14281432 request a frame on some if its inputs if a frame is requested on any of
14291433 its output.
1434+
1435+ - Request a frame on the input for sinks.
1436+
1437+ Rationale: sinks using the old api have no way to request a frame on their
1438+ input, so we need to do it for them.
14301439 */
14311440
14321441 int ff_filter_activate(AVFilterContext *filter)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t