]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mp3dec.c
avformat/wavenc: Use localtime_r() for thread saftey
[ffmpeg] / libavformat / mp3dec.c
index 8745f209d321f89f86cda1c5bd673fa35de01f84..8208dbb6283d2f5eab72e93c69c618638b6c91c1 100644 (file)
@@ -37,6 +37,7 @@
 #define XING_FLAG_FRAMES 0x01
 #define XING_FLAG_SIZE   0x02
 #define XING_FLAG_TOC    0x04
+#define XING_FLAC_QSCALE 0x08
 
 #define XING_TOC_COUNT 100
 
@@ -168,8 +169,8 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
                                        (AVRational){spf, c->sample_rate},
                                        st->time_base));
     /* VBR quality */
-    if(v & 8)
-        avio_skip(s->pb, 4);
+    if (v & XING_FLAC_QSCALE)
+        avio_rb32(s->pb);
 
     /* Encoder short version string */
     memset(version, 0, sizeof(version));
@@ -214,7 +215,9 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
     /* Encoder delays */
     v= avio_rb24(s->pb);
     if(AV_RB32(version) == MKBETAG('L', 'A', 'M', 'E')
-        || AV_RB32(version) == MKBETAG('L', 'a', 'v', 'f')) {
+        || AV_RB32(version) == MKBETAG('L', 'a', 'v', 'f')
+        || AV_RB32(version) == MKBETAG('L', 'a', 'v', 'c')
+    ) {
 
         mp3->start_pad = v>>12;
         mp3->  end_pad = v&4095;