]> git.sesse.net Git - ffmpeg/commitdiff
avconv: declare some variables in blocks where they are used
authorAnton Khirnov <anton@khirnov.net>
Tue, 22 Nov 2011 06:13:29 +0000 (07:13 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 23 Nov 2011 21:01:32 +0000 (22:01 +0100)
avconv.c

index 1c17be81b226158a1c432e611178fd367e56185a..c31aa459ed667d57724d224bfc139b6b5665f695 100644 (file)
--- a/avconv.c
+++ b/avconv.c
@@ -1840,8 +1840,7 @@ static int output_packet(InputStream *ist, int ist_index,
                          OutputStream *ost_table, int nb_ostreams,
                          const AVPacket *pkt)
 {
-    OutputStream *ost;
-    int ret = 0, i;
+    int i;
     int got_output;
     int64_t pkt_pts = AV_NOPTS_VALUE;
 
@@ -1867,6 +1866,7 @@ static int output_packet(InputStream *ist, int ist_index,
 
     //while we have more to decode or while the decoder did output something on EOF
     while (ist->decoding_needed && (avpkt.size > 0 || (!pkt && got_output))) {
+        int ret = 0;
     handle_eof:
         ist->pts= ist->next_pts;
 
@@ -1917,7 +1917,7 @@ static int output_packet(InputStream *ist, int ist_index,
         }
     }
     for (i = 0; pkt && i < nb_ostreams; i++) {
-        ost = &ost_table[i];
+        OutputStream *ost = &ost_table[i];
 
         if (!check_output_constraints(ist, ost) || ost->encoding_needed)
             continue;