aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-06-08 13:28:33 +0200
committerAnton Khirnov <anton@khirnov.net>2023-07-20 20:30:13 +0200
commit3a89e6d35261a261bae10fa856ea512385df6076 (patch)
tree42aa993b7d6ade3bc049e3c22cf0ff084b3000da /fftools/ffmpeg.c
parent9d44eb8af5392ee208ca22e5997c27ab3aa2afc2 (diff)
downloadffmpeg-3a89e6d35261a261bae10fa856ea512385df6076.tar.gz
fftools/ffmpeg_filter: restrict reap_filters() to a single filtergraph
This is more natural, as all except one of its callers require processing only one filtergraph.
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r--fftools/ffmpeg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index cbeddab125..27c4e7ef26 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1171,7 +1171,15 @@ static int transcode_step(OutputStream *ost)
if (ret < 0)
return ret == AVERROR_EOF ? 0 : ret;
- return reap_filters(0);
+ // process_input() above might have caused output to become available
+ // in multiple filtergraphs, so we process all of them
+ for (int i = 0; i < nb_filtergraphs; i++) {
+ ret = reap_filters(filtergraphs[i], 0);
+ if (ret < 0)
+ return ret;
+ }
+
+ return 0;
}
/*