[FFmpeg-cvslog] r20175 - trunk/libavformat/mp3.c

cehoyos subversion
Mon Oct 5 23:36:56 CEST 2009


Author: cehoyos
Date: Mon Oct  5 23:36:56 2009
New Revision: 20175

Log:
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

Modified:
   trunk/libavformat/mp3.c

Modified: trunk/libavformat/mp3.c
==============================================================================
--- trunk/libavformat/mp3.c	Mon Oct  5 23:33:50 2009	(r20174)
+++ trunk/libavformat/mp3.c	Mon Oct  5 23:36:56 2009	(r20175)
@@ -142,8 +142,9 @@ static int mp3_read_header(AVFormatConte
     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)



More information about the ffmpeg-cvslog mailing list