From af81338c21c67c0ef2c30ab2009c7094b32327f4 Mon Sep 17 00:00:00 2001 From: Andreas Hakon Date: Wed, 17 Apr 2019 21:22:43 +0100 Subject: [PATCH] libavformat: input init fix mpegts filters This patch solves the initialization of the inputs when using filters (a graph filter) with the mpegts muxer. This bug seems to be generated by a simple forgetting to copy. The same code is repeated two times, but only in one case the variable inputs_done is initialized. Testcase: $ ffmpeg -f mpegts -i mpeg.ts \ -filter_complex "[i:100]fps=fps=25[out]" \ -map "[out]" -c:v libx264 -f mpegts out.ts Signed-off-by: Andreas Hakon --- fftools/ffmpeg.c | 8 ++++++-- libavformat/utils.c | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0f157d6..b74a209 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -4613,9 +4613,10 @@ static int transcode_step(void) } if ((ret = transcode_from_filter(ost->filter->graph, &ist)) < 0) return ret; - if (!ist) + if (!ist) { + ost->inputs_done = 1; return 0; + } } else if (ost->filter) { int i; for (i = 0; i < ost->filter->graph->nb_inputs; i++) { -- 1.7.10.4