matroskadec: declare var where it's used
authorAurelien Jacobs <aurel@gnuage.org>
Tue, 5 Aug 2008 00:40:33 +0000 (00:40 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Tue, 5 Aug 2008 00:40:33 +0000 (00:40 +0000)
Originally committed as revision 14563 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroskadec.c

index a380733cba7cbad8ec43dbe67a234ea7b9938fd5..b6996df728e6eb169a82910e9b494bf7e9e4383c 100644 (file)
@@ -1386,7 +1386,6 @@ matroska_parse_seekhead (MatroskaDemuxContext *matroska)
                     case MATROSKA_ID_TAGS: {
                         uint32_t level_up = matroska->level_up;
                         offset_t before_pos;
-                        uint64_t length;
                         MatroskaLevel level;
 
                         /* remember the peeked ID and the current position */
@@ -1448,9 +1447,7 @@ matroska_parse_seekhead (MatroskaDemuxContext *matroska)
                         /* remove dummy level */
                         if (dummy_level)
                             while (matroska->num_levels) {
-                                matroska->num_levels--;
-                                length =
-                                  matroska->levels[matroska->num_levels].length;
+                                uint64_t length = matroska->levels[--matroska->num_levels].length;
                                 if (length == (uint64_t)-1)
                                     break;
                             }