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.
This commit is contained in:
Anton Khirnov
2023-06-08 13:28:33 +02:00
parent 9d44eb8af5
commit 3a89e6d352
3 changed files with 27 additions and 20 deletions

View File

@@ -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;
}
/*