[vlc-commits] Fix bug in taglib txxx handling

Johannes Weißl git at videolan.org
Tue Feb 15 23:46:01 CET 2011


vlc/vlc-1.1 | branch: master | Johannes Weißl <jargon at molb.org> | Wed Feb  9 14:23:25 2011 +0100| [ba73797f787184a215900783a1718d3ba665a600] | committer: Jean-Baptiste Kempf

Fix bug in taglib txxx handling

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 at remlab.net>
(cherry picked from commit 5010066b9771f6862e71b53f36e27816500e04f3)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=ba73797f787184a215900783a1718d3ba665a600
---

 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 9bc3235..549e876 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -158,7 +158,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 informations



More information about the vlc-commits mailing list