[FFmpeg-cvslog] lavf: move a variable declaration to the block where it's used

Anton Khirnov git at videolan.org
Tue Sep 3 14:29:07 CEST 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Aug 25 11:53:34 2013 +0200| [fab694dd3931b1c0bc3c598c3f88b1902c14a303] | committer: Anton Khirnov

lavf: move a variable declaration to the block where it's used

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

 libavformat/utils.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 89f92ea..eb89f43 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1749,12 +1749,12 @@ static void fill_all_stream_timings(AVFormatContext *ic)
 static void estimate_timings_from_bit_rate(AVFormatContext *ic)
 {
     int64_t filesize, duration;
-    int bit_rate, i;
+    int i;
     AVStream *st;
 
     /* if bit_rate is already set, we believe it */
     if (ic->bit_rate <= 0) {
-        bit_rate = 0;
+        int bit_rate = 0;
         for(i=0;i<ic->nb_streams;i++) {
             st = ic->streams[i];
             if (st->codec->bit_rate > 0)



More information about the ffmpeg-cvslog mailing list