avconv: use correct output stream index when checking max_frames
authorAnton Khirnov <anton@khirnov.net>
Fri, 23 Sep 2011 12:40:29 +0000 (14:40 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sun, 25 Sep 2011 06:28:14 +0000 (08:28 +0200)
avconv.c

index 43792e1..9e2fac7 100644 (file)
--- a/avconv.c
+++ b/avconv.c
@@ -2333,8 +2333,8 @@ static int transcode(OutputFile *output_files,
             }
             if (ost->frame_number >= ost->max_frames) {
                 int j;
-                for (j = of->ost_index; j < of->ctx->nb_streams; j++)
-                    output_streams[j].is_past_recording_time = 1;
+                for (j = 0; j < of->ctx->nb_streams; j++)
+                    output_streams[of->ost_index + j].is_past_recording_time = 1;
                 continue;
             }
         }