History

avfilter/avfilter: always forward request frame in filter_activate_default

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.

Marton Balint committed 1 year ago

Commit 4440e491 parent a85835b1 file · +11 −0Browse files

Unified · Split

libavfilter/avfilter.c+11−0
@@ -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 requesting1421 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
1421int ff_filter_activate(AVFilterContext *filter)1432int 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