[FFmpeg-cvslog] ffmpeg: use close_output_stream more systematically.

Nicolas George git at videolan.org
Wed Aug 22 19:20:00 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Mon Aug 20 11:08:34 2012 +0200| [8b61abac2ee6f4184d65e8527b82cd103cc0b98b] | committer: Nicolas George

ffmpeg: use close_output_stream more systematically.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b61abac2ee6f4184d65e8527b82cd103cc0b98b
---

 ffmpeg.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index c39e5a3..4e8d32d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -591,7 +591,7 @@ static int check_recording_time(OutputStream *ost)
     if (of->recording_time != INT64_MAX &&
         av_compare_ts(ost->sync_opts - ost->first_pts, ost->st->codec->time_base, of->recording_time,
                       AV_TIME_BASE_Q) >= 0) {
-        ost->finished = 1;
+        close_output_stream(ost);
         return 0;
     }
     return 1;
@@ -1325,7 +1325,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
 
     if (of->recording_time != INT64_MAX &&
         ist->pts >= of->recording_time + of->start_time) {
-        ost->finished = 1;
+        close_output_stream(ost);
         return;
     }
 
@@ -2410,7 +2410,7 @@ static int need_output(void)
         if (ost->frame_number >= ost->max_frames) {
             int j;
             for (j = 0; j < of->ctx->nb_streams; j++)
-                output_streams[of->ost_index + j]->finished = 1;
+                close_output_stream(output_streams[of->ost_index + j]);
             continue;
         }
 



More information about the ffmpeg-cvslog mailing list