Commit c0443c1a authored by Marton Balint's avatar Marton Balint

lavfi/avfiltergraph: only return EOF in avfilter_graph_request_oldest if all sinks EOFed

Fixes a regression introduced in 32c59a11,
becoming effective in 912969a3.

Fixes trimmed output of
ffmpeg -f lavfi -i "sine=d=0.01" -f lavfi -i "sine=d=1" -filter_complex "[0:a]anull[a1];[1:a]anull[a2]" -map "[a1]" -f null none -map "[a2]" -f framecrc -
Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 441026fc
...@@ -1399,10 +1399,13 @@ int avfilter_graph_request_oldest(AVFilterGraph *graph) ...@@ -1399,10 +1399,13 @@ int avfilter_graph_request_oldest(AVFilterGraph *graph)
oldest = graph->sink_links[0]; oldest = graph->sink_links[0];
if (oldest->dst->filter->activate) { if (oldest->dst->filter->activate) {
/* For now, buffersink is the only filter implementing activate. */ /* For now, buffersink is the only filter implementing activate. */
return av_buffersink_get_frame_flags(oldest->dst, NULL, r = av_buffersink_get_frame_flags(oldest->dst, NULL,
AV_BUFFERSINK_FLAG_PEEK); AV_BUFFERSINK_FLAG_PEEK);
if (r != AVERROR_EOF)
return r;
} else {
r = ff_request_frame(oldest);
} }
r = ff_request_frame(oldest);
if (r != AVERROR_EOF) if (r != AVERROR_EOF)
break; break;
av_log(oldest->dst, AV_LOG_DEBUG, "EOF on sink link %s:%s.\n", av_log(oldest->dst, AV_LOG_DEBUG, "EOF on sink link %s:%s.\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment