[vlc-commits] Vorbis: fix totaltracks info parsing

Jean-Baptiste Kempf git at videolan.org
Mon Aug 13 19:41:46 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 13 19:39:52 2012 +0200| [4e70b5233d9760b0b12f429adec8b2e243b321bc] | committer: Jean-Baptiste Kempf

Vorbis: fix totaltracks info parsing

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

 modules/demux/vorbis.h |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/demux/vorbis.h b/modules/demux/vorbis.h
index ebaedd9..ef60c75 100644
--- a/modules/demux/vorbis.h
+++ b/modules/demux/vorbis.h
@@ -152,10 +152,11 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
         IF_EXTRACT("TITLE=", Title )
         else IF_EXTRACT("ALBUM=", Album )
         else IF_EXTRACT("TRACKNUMBER=", TrackNumber )
-        else if( !hasTrackTotal )
-        { IF_EXTRACT("TRACKTOTAL=", TrackTotal ) }
-        else if( !hasTrackTotal )
-        { IF_EXTRACT("TOTALTRACKS=", TrackTotal ) }
+        else if( !strncasecmp(psz_comment, "TRACKTOTAL=", strlen("TRACKTOTAL=")))
+            vlc_meta_Set( p_meta, vlc_meta_TrackTotal, &psz_comment[strlen("TRACKTOTAL=")] );
+        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 )



More information about the vlc-commits mailing list