summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2016-12-23 11:18:09 +0100
committerNicolas George <george@nsup.org>2016-12-23 15:21:43 +0100
commit373f21a91126d052cd310d675f43f548a407649e (patch)
treeacf733e4ae623b494a1609b467c2c9d0f41f690c /libavfilter
parent0ed4993ad0e20955ac82a7a90aa7f8a6b002c2f2 (diff)
lavfi: avfilter_graph_request_oldest: request a frame again before returning.
With min_samples, if a frame arrives but is too small, it clears frame_wanted_out. In most cases, the destination filter would be activated again later because of frame_wanted_out on its own outputs, but not sinks. avfilter_graph_request_oldest() is doing the work of the sink itself, and is therefore allowed to use frame_blocked_in.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfiltergraph.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 6b5a6f34ec..cb5d618ab1 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -1407,7 +1407,11 @@ int avfilter_graph_request_oldest(AVFilterGraph *graph)
frame_count = oldest->frame_count_out;
while (frame_count == oldest->frame_count_out) {
r = ff_filter_graph_run_once(graph);
- if (r < 0)
+ if (r == AVERROR(EAGAIN) &&
+ !oldest->frame_wanted_out && !oldest->frame_blocked_in &&
+ !oldest->status_in)
+ ff_request_frame(oldest);
+ else if (r < 0)
return r;
}
return 0;