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

Unified · Split

libavfilter/avfilter.c+9−0
@@ -1288,6 +1288,10 @@ static int filter_activate_default(AVFilterContext *filter) · 1287 unmodified lines
1288 if (li->frame_wanted_out)1288 if (li->frame_wanted_out)
1289 return request_frame_to_filter(filter->outputs[i]);1289 return request_frame_to_filter(filter->outputs[i]);
1290 }1290 }
1291 if (!filter->nb_outputs) {
1292 ff_inlink_request_frame(filter->inputs[0]);
1293 return 0;
1294 }
1291 return FFERROR_NOT_READY;1295 return FFERROR_NOT_READY;
1292}1296}
1293 1297
@@ -1427,6 +1431,11 @@ static int filter_activate_default(AVFilterContext *filter) · 133 unmodified lines
1427 Rationale: even if all inputs are blocked an activate callback should1431 Rationale: even if all inputs are blocked an activate callback should
1428 request a frame on some if its inputs if a frame is requested on any of1432 request a frame on some if its inputs if a frame is requested on any of
1429 its output.1433 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.
1430 */1439 */
1431 1440
1432int ff_filter_activate(AVFilterContext *filter)1441int 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