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

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


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

Vorbis: do not display meaningless data in meta

It can even crash Qt interface

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

 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 d5a9f4b..491c7b6 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -577,11 +577,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" ) )
             {
@@ -613,6 +608,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