]> git.sesse.net Git - vlc/commitdiff
Fix bug in taglib txxx handling
authorJohannes Weißl <jargon@molb.org>
Wed, 9 Feb 2011 13:23:25 +0000 (14:23 +0100)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 15 Feb 2011 21:06:07 +0000 (23:06 +0200)
Currently, vlc puts the value *and* the description in the value field
for id3 TXXX tags, e.g. in Media Information:
REPLAYGAIN_TRACK_GAIN: REPLAYGAIN_TRACK_GAIN +3.30 dB

This leads to vlc_audio_replay_gain_MergeFromMeta() failing because it
can't parse the floating point value. Since the fieldList() of an
UserTextIdentificationFrame has exactly two members, it is safe to just
use the last (value) member. In Media Information:
REPLAYGAIN_TRACK_GAIN: +3.30 dB

This makes ReplayGain work for mp3 files.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/meta_engine/taglib.cpp

index f67dbdafd8e9ec8d44de088862b2a13f1891efbb..f6dfaaa780d014ae72f143044a5f38047ba78fa6 100644 (file)
@@ -159,7 +159,7 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_t* p_demux, demux_meta_t*
         if( !p_txxx )
             continue;
         vlc_meta_AddExtra( p_meta, p_txxx->description().toCString( true ),
-                           p_txxx->fieldList().toString().toCString( true ) );
+                           p_txxx->fieldList().back().toCString( true ) );
     }
 
     // Get some more information