[vlc-commits] Vorbis: do not display meaningless data in meta

Jean-Baptiste Kempf git at videolan.org
Thu Apr 5 22:49:30 CEST 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Apr  5 21:39:12 2012 +0200| [6444ba4422320bae142661bd3a16ed1298523ca1] | committer: Jean-Baptiste Kempf

Vorbis: do not display meaningless data in meta

It can even crash Qt interface
(cherry picked from commit 71a82406e23055bddbe1f9a2f3f31efd1df63938)

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

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=6444ba4422320bae142661bd3a16ed1298523ca1
---

 modules/codec/vorbis.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 3f4c802..d575ac9 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -572,11 +572,6 @@ static void ParseVorbisComments( decoder_t *p_dec )
             if( *psz_value == '\0' )
                 break;
 
-            if( !p_dec->p_description )
-                p_dec->p_description = vlc_meta_New();
-            if( p_dec->p_description )
-                vlc_meta_AddExtra( p_dec->p_description, psz_name, psz_value );
-
             if( !strcasecmp( psz_name, "REPLAYGAIN_TRACK_GAIN" ) ||
                      !strcasecmp( psz_name, "RG_RADIO" ) )
             {
@@ -608,6 +603,16 @@ static void ParseVorbisComments( decoder_t *p_dec )
                 r->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = true;
                 r->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
             }
+            else if( !strcasecmp( psz_name, "METADATA_BLOCK_PICTURE" ) )
+            { /* Do nothing, for now */ }
+            else
+            {
+                if( !p_dec->p_description )
+                    p_dec->p_description = vlc_meta_New();
+                if( p_dec->p_description )
+                    vlc_meta_AddExtra( p_dec->p_description, psz_name, psz_value );
+            }
+
         }
         free( psz_comment );
         i++;



More information about the vlc-commits mailing list