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.
Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all
Unified · Split
| @@ -1288,6 +1288,10 @@ static int filter_activate_default(AVFilterContext *filter) · 1287 unmodified lines | ||
| 1288 | 1288 | if (li->frame_wanted_out) |
| 1289 | 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 | 1295 | return FFERROR_NOT_READY; |
| 1292 | 1296 | } |
| 1293 | 1297 | |
| @@ -1427,6 +1431,11 @@ static int filter_activate_default(AVFilterContext *filter) · 133 unmodified lines | ||
| 1427 | 1431 | Rationale: even if all inputs are blocked an activate callback should |
| 1428 | 1432 | request a frame on some if its inputs if a frame is requested on any of |
| 1429 | 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 | |
| 1432 | 1441 | int ff_filter_activate(AVFilterContext *filter) |