[FFmpeg-cvslog] avconv: Make sure that inputless filtergraphs are configured

Luca Barbato git at videolan.org
Sat Mar 18 21:01:02 EET 2017


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Wed Aug  3 04:21:41 2016 +0200| [f6d2fed811dea36c4ebaf991927e44c78eb0aca5] | committer: Luca Barbato

avconv: Make sure that inputless filtergraphs are configured

Unbreak `avconv -filter_complex testsrc`.

Regression introduced in a3a0230a9870b9018dc7415ae5872784d524cfe5

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6d2fed811dea36c4ebaf991927e44c78eb0aca5
---

 avconv.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/avconv.c b/avconv.c
index 43d67e8..59eb300 100644
--- a/avconv.c
+++ b/avconv.c
@@ -766,6 +766,15 @@ static int poll_filters(void)
         for (i = 0; i < nb_output_streams; i++) {
             int64_t pts = output_streams[i]->sync_opts;
 
+            if (output_streams[i]->filter && !output_streams[i]->filter->graph->graph &&
+                !output_streams[i]->filter->graph->nb_inputs) {
+                ret = configure_filtergraph(output_streams[i]->filter->graph);
+                if (ret < 0) {
+                    av_log(NULL, AV_LOG_ERROR, "Error reinitializing filters!\n");
+                    return ret;
+                }
+            }
+
             if (!output_streams[i]->filter || output_streams[i]->finished ||
                 !output_streams[i]->filter->graph->graph)
                 continue;



More information about the ffmpeg-cvslog mailing list