]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg: move close_output_stream earlier.
authorNicolas George <nicolas.george@normalesup.org>
Mon, 20 Aug 2012 08:57:18 +0000 (10:57 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Wed, 22 Aug 2012 17:04:30 +0000 (19:04 +0200)
It will avoid a forward declaration.

ffmpeg.c

index 597c05170a10921be34e2269900c8c46771866b4..c39e5a3cfc04ca048f6595f72ec4dfa83fc4728d 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -572,6 +572,18 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
     }
 }
 
+static void close_output_stream(OutputStream *ost)
+{
+    OutputFile *of = output_files[ost->file_index];
+
+    ost->finished = 1;
+    if (of->shortest) {
+        int i;
+        for (i = 0; i < of->ctx->nb_streams; i++)
+            output_streams[of->ost_index + i]->finished = 1;
+    }
+}
+
 static int check_recording_time(OutputStream *ost)
 {
     OutputFile *of = output_files[ost->file_index];
@@ -2661,18 +2673,6 @@ static void reset_eagain(void)
         output_streams[i]->unavailable = 0;
 }
 
-static void close_output_stream(OutputStream *ost)
-{
-    OutputFile *of = output_files[ost->file_index];
-
-    ost->finished = 1;
-    if (of->shortest) {
-        int i;
-        for (i = 0; i < of->ctx->nb_streams; i++)
-            output_streams[of->ost_index + i]->finished = 1;
-    }
-}
-
 /**
  * @return
  * - 0 -- one packet was read and processed