Correct determination of file size and frames in VBRI headers
authorIngo Brückl <ib@wupperonline.de>
Thu, 15 Sep 2011 14:19:05 +0000 (16:19 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Sep 2011 17:49:52 +0000 (19:49 +0200)
The fields "Number of Bytes" and "Number of Frames" are mixed up. "Bytes"
come first, "Frames" behind.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5d305c9398c043f9ae3bbc6d64a3e1dc468c1e63)

libavformat/mp3dec.c

index 64f6ea8..47772a4 100644 (file)
@@ -109,8 +109,8 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
         if(avio_rb16(s->pb) == 1) {
             /* skip delay and quality */
             avio_skip(s->pb, 4);
-            frames = avio_rb32(s->pb);
             size = avio_rb32(s->pb);
+            frames = avio_rb32(s->pb);
         }
     }