]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mp3dec.c
Reject audio tracks with invalid interleaver parameters in RM demuxer.
[ffmpeg] / libavformat / mp3dec.c
index c2cb54c9afa6f6e2f6d5506f70c3f2b0080a5df4..f993f2a775763af7c8c584bc7bea7b641111c20d 100644 (file)
@@ -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);
         }
     }
 
@@ -188,12 +188,11 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt)
 }
 
 AVInputFormat ff_mp3_demuxer = {
-    "mp3",
-    NULL_IF_CONFIG_SMALL("MPEG audio layer 2/3"),
-    0,
-    mp3_read_probe,
-    mp3_read_header,
-    mp3_read_packet,
+    .name           = "mp3",
+    .long_name      = NULL_IF_CONFIG_SMALL("MPEG audio layer 2/3"),
+    .read_probe     = mp3_read_probe,
+    .read_header    = mp3_read_header,
+    .read_packet    = mp3_read_packet,
     .flags= AVFMT_GENERIC_INDEX,
     .extensions = "mp2,mp3,m2a", /* XXX: use probe */
 };