[vlc-commits] Sort Xiph tag checks.

Timothy B. Terriberry git at videolan.org
Tue Sep 3 11:29:21 CEST 2013


vlc | branch: master | Timothy B. Terriberry <tterribe at xiph.org> | Mon Sep  2 09:28:41 2013 -0700| [c73cb845d48fb926295a7eeaa13b212cce4e5618] | committer: Jean-Baptiste Kempf

Sort Xiph tag checks.

This places them in the same order as they appear in vlc_meta.h to
make it easier to see which ones are present and which ones are
missing.

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

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

 modules/demux/xiph_metadata.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/demux/xiph_metadata.c b/modules/demux/xiph_metadata.c
index f4f324d..14f2c6f 100644
--- a/modules/demux/xiph_metadata.c
+++ b/modules/demux/xiph_metadata.c
@@ -154,14 +154,14 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
 
     /* */
     bool hasTitle        = false;
-    bool hasAlbum        = false;
-    bool hasTrackTotal   = false;
     bool hasArtist       = false;
+    bool hasGenre        = false;
     bool hasCopyright    = false;
+    bool hasAlbum        = false;
     bool hasDescription  = false;
-    bool hasGenre        = false;
     bool hasDate         = false;
     bool hasPublisher    = false;
+    bool hasTrackTotal   = false;
 
     for( ; i_comment > 0; i_comment-- )
     {
@@ -196,6 +196,9 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
         has##var = true; \
     }
         IF_EXTRACT("TITLE=", Title )
+        else IF_EXTRACT("ARTIST=", Artist )
+        else IF_EXTRACT("GENRE=", Genre )
+        else IF_EXTRACT("COPYRIGHT=", Copyright )
         else IF_EXTRACT("ALBUM=", Album )
         else if( !strncasecmp(psz_comment, "TRACKNUMBER=", strlen("TRACKNUMBER=" ) ) )
         {
@@ -218,13 +221,10 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
         else if( !strncasecmp(psz_comment, "TOTALTRACKS=", strlen("TOTALTRACKS=")))
             vlc_meta_Set( p_meta, vlc_meta_TrackTotal, &psz_comment[strlen("TOTALTRACKS=")] );
         else IF_EXTRACT("TOTALTRACKS=", TrackTotal )
-        else IF_EXTRACT("ARTIST=", Artist )
-        else IF_EXTRACT("COPYRIGHT=", Copyright )
-        else IF_EXTRACT("ORGANIZATION=", Publisher )
         else IF_EXTRACT("DESCRIPTION=", Description )
         else IF_EXTRACT("COMMENTS=", Description )
-        else IF_EXTRACT("GENRE=", Genre )
         else IF_EXTRACT("DATE=", Date )
+        else IF_EXTRACT("ORGANIZATION=", Publisher )
         else if( !strncasecmp( psz_comment, "METADATA_BLOCK_PICTURE=", strlen("METADATA_BLOCK_PICTURE=")))
         {
             if( attachments == NULL )



More information about the vlc-commits mailing list