[vlc-devel] [PATCH] Fix bug in taglib txxx handling

Johannes Weißl jargon at molb.org
Wed Feb 9 14:23:25 CET 2011

Currently, vlc puts the value *and* the description in the value field
for id3 TXXX tags, e.g. in Media Information:

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:

This makes ReplayGain work for mp3 files.
 modules/meta_engine/taglib.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index f67dbda..f6dfaaa 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -159,7 +159,7 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_t* p_demux, demux_meta_t*
         if( !p_txxx )
         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

More information about the vlc-devel mailing list