diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-10-18 16:25:16 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-10-24 09:03:16 +0200 |
commit | 99143140dea12363af680d02e23cb42cfe191679 (patch) | |
tree | 37dba840fb9102acecedef98fdf30f65b71e1190 | |
parent | 6df9d9b55d3f56ee7782639a7678eeeaf77f14ea (diff) | |
download | ffmpeg-99143140dea12363af680d02e23cb42cfe191679.tar.gz |
mp3dec: fix reading the Xing tag
The quality scale field is only supposed to be present if the fourth bit
is set. In practice, lame always sets it, but other tools might not.
CC:libav-stable@libav.org
-rw-r--r-- | libavformat/mp3dec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 14d8254f4c..5aee21fe28 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -36,6 +36,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 @@ -165,7 +166,8 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st, st->time_base)); /* VBR quality */ - avio_rb32(s->pb); + if (v & XING_FLAC_QSCALE) + avio_rb32(s->pb); /* Encoder short version string */ memset(version, 0, sizeof(version)); |