[FFmpeg-devel] [PATCH 3/7] ffmpeg: move close_output_stream earlier.

Nicolas George nicolas.george at normalesup.org
Mon Aug 20 23:28:11 CEST 2012


It will avoid a forward declaration.

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 ffmpeg.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 597c051..c39e5a3 100644
--- 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
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list