summaryrefslogtreecommitdiff
path: root/avconv_filter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-06-27 19:03:42 +0200
committerAnton Khirnov <anton@khirnov.net>2016-06-28 08:30:20 +0200
commit94ebf5565849e4dc036d2ca43979571ed3736457 (patch)
treec05b2f708304279e023b135042816ea9165da36c /avconv_filter.c
parentd2e56cf753a6c462041dee897d9d0c90f349988c (diff)
avconv: 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
Diffstat (limited to 'avconv_filter.c')
-rw-r--r--avconv_filter.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/avconv_filter.c b/avconv_filter.c
index 1acbd88166..96277f80eb 100644
--- a/avconv_filter.c
+++ b/avconv_filter.c
@@ -780,6 +780,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;
}