[SCM] libav/experimental: 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.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:52:37 UTC 2013


The following commit has been merged in the experimental branch:
commit 7fd5aeb3e57389198681a8ab2d5cd5d83a0c5a5f
Author: Anton Khirnov <wyskas at gmail.com>
Date:   Mon Oct 5 21:36:56 2009 +0000

    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

diff --git a/libavformat/mp3.c b/libavformat/mp3.c
index cad13cf..5b5e06d 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)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list