aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2009-10-05 21:36:56 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2009-10-05 21:36:56 +0000
commit7fd5aeb3e57389198681a8ab2d5cd5d83a0c5a5f (patch)
treee486b0148fa76c0573a76e6318041cea47053348 /libavformat
parent9a9964c50ed85a0bf8d8ab384801d4ea07017f76 (diff)
downloadffmpeg-7fd5aeb3e57389198681a8ab2d5cd5d83a0c5a5f.tar.gz
Only read ID3v1 tag if ID3v2 isn't present or is empty.
This prevents the demuxer from exporting multiple semantically identical but differently named tags. Patch by Anton Khirnov, wyskas gmail Originally committed as revision 20175 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mp3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mp3.c b/libavformat/mp3.c
index cad13cfe6a..5b5e06d04f 100644
--- a/libavformat/mp3.c
+++ b/libavformat/mp3.c
@@ -142,8 +142,9 @@ static int mp3_read_header(AVFormatContext *s,
st->need_parsing = AVSTREAM_PARSE_FULL;
st->start_time = 0;
- ff_id3v1_read(s);
ff_id3v2_read(s);
+ if (!av_metadata_get(s->metadata, "", NULL, AV_METADATA_IGNORE_SUFFIX))
+ ff_id3v1_read(s);
off = url_ftell(s->pb);
if (mp3_parse_vbr_tags(s, st, off) < 0)