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 outputs.
Unified · Split
| @@ -1283,6 +1283,11 @@ static int filter_activate_default(AVFilterContext *filter) · 1282 unmodified lines | |||
| 1283 | return request_frame_to_filter(filter->outputs[i]); | 1283 | return request_frame_to_filter(filter->outputs[i]); |
| 1284 | } | 1284 | } |
| 1285 | } | 1285 | } |
| 1286 | for (i = 0; i < filter->nb_outputs; i++) { | ||
| 1287 | FilterLinkInternal * const li = ff_link_internal(filter->outputs[i]); | ||
| 1288 | if (li->frame_wanted_out) | ||
| 1289 | return request_frame_to_filter(filter->outputs[i]); | ||
| 1290 | } | ||
| 1286 | return FFERROR_NOT_READY; | 1291 | return FFERROR_NOT_READY; |
| 1287 | } | 1292 | } |
| 1288 | 1293 | ||
| @@ -1416,6 +1421,12 @@ static int filter_activate_default(AVFilterContext *filter) · 127 unmodified lines | |||
| 1416 | Rationale: checking frame_blocked_in is necessary to avoid requesting | 1421 | Rationale: checking frame_blocked_in is necessary to avoid requesting |
| 1417 | repeatedly on a blocked input if another is not blocked (example: | 1422 | repeatedly on a blocked input if another is not blocked (example: |
| 1418 | [buffersrc1][testsrc1][buffersrc2][testsrc2]concat=v=2). | 1423 | [buffersrc1][testsrc1][buffersrc2][testsrc2]concat=v=2). |
| 1424 | |||
| 1425 | - If an output has frame_wanted_out > 0 call request_frame(). | ||
| 1426 | |||
| 1427 | 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 of | ||
| 1429 | its output. | ||
| 1419 | */ | 1430 | */ |
| 1420 | 1431 | ||
| 1421 | int ff_filter_activate(AVFilterContext *filter) | 1432 | int ff_filter_activate(AVFilterContext *filter) |