From 5d305c9398c043f9ae3bbc6d64a3e1dc468c1e63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@wupperonline.de>
Date: Thu, 15 Sep 2011 16:19:05 +0200
Subject: [PATCH] Correct determination of file size and frames in VBRI headers

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>
---
 libavformat/mp3dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 73fce71cea..f993f2a775 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -110,8 +110,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);
         }
     }