From 76e13bdeaabc7ec49322b3a118dc4805153e0401 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 27 Jun 2016 19:03:42 +0200 Subject: ffmpeg: restructure sending EOF to filters Be more careful when an input stream encounters EOF when its filtergraph has not been configured yet. The current code would immediately mark the corresponding output streams as finished, while there may still be buffered frames waiting for frames to appear on other filtergraph inputs. This should fix the random FATE failures for complex filtergraph tests after a3a0230a9870b9018dc7415ae5872784d524cfe5 This merges Libav commit 94ebf55. It was previously skipped. This is the last filter init related Libav commit that was skipped, so this also removes the commits from doc/libav-merge.txt. Signed-off-by: wm4 --- ffmpeg_filter.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ffmpeg_filter.c') diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c index 4d9a4e2eb8..816c906c7e 100644 --- a/ffmpeg_filter.c +++ b/ffmpeg_filter.c @@ -1128,6 +1128,15 @@ int configure_filtergraph(FilterGraph *fg) } } + /* send the EOFs for the finished inputs */ + for (i = 0; i < fg->nb_inputs; i++) { + if (fg->inputs[i]->eof) { + ret = av_buffersrc_add_frame(fg->inputs[i]->filter, NULL); + if (ret < 0) + return ret; + } + } + return 0; } -- cgit v1.2.3