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
12831283 return request_frame_to_filter(filter->outputs[i]);
12841284 }
12851285 }
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+ }
12861291 return FFERROR_NOT_READY;
12871292 }
12881293
@@ -1416,6 +1421,12 @@ static int filter_activate_default(AVFilterContext *filter) · 127 unmodified lines
14161421 Rationale: checking frame_blocked_in is necessary to avoid requesting
14171422 repeatedly on a blocked input if another is not blocked (example:
14181423 [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.
14191430 */
14201431
14211432 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