aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-10-19 13:46:14 +0200
committerAnton Khirnov <anton@khirnov.net>2022-11-17 10:52:58 +0100
commit1b076556c65a6b49ab3ee48eda8061f9f0dc180b (patch)
treeb001c4725696a7706b8778506c11a5492b4286bb
parent07357e56a64530b2bba976a49719a38f46e92f01 (diff)
downloadffmpeg-1b076556c65a6b49ab3ee48eda8061f9f0dc180b.tar.gz
fftools/ffmpeg: simplify ost_iter()
The inner loop never goes through more than 1 iteration, and so can be replaced by an if(). Found-by: Andreas Rheinhardt
-rw-r--r--fftools/ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index e6f6773f6a..0fa2fe8c52 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -612,7 +612,7 @@ static OutputStream *ost_iter(OutputStream *prev)
for (; of_idx < nb_output_files; of_idx++) {
OutputFile *of = output_files[of_idx];
- for (; ost_idx < of->nb_streams; ost_idx++)
+ if (ost_idx < of->nb_streams)
return of->streams[ost_idx];
ost_idx = 0;