summaryrefslogtreecommitdiff
path: root/ffmpeg_filter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-06-27 19:03:42 +0200
committerwm4 <nfxjfg@googlemail.com>2017-03-03 08:45:43 +0100
commit76e13bdeaabc7ec49322b3a118dc4805153e0401 (patch)
tree3fb9e7fc2ab899cd7d652d5afd30fab818323208 /ffmpeg_filter.c
parentcb884f8d7e3b55cddf8a4568bddb1e5f5f86b811 (diff)
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 <nfxjfg@googlemail.com>
Diffstat (limited to 'ffmpeg_filter.c')
-rw-r--r--ffmpeg_filter.c9
1 files changed, 9 insertions, 0 deletions
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;
}