[vlc-commits] demux: mp4: don't display zero trkn total

Francois Cartegnie git at videolan.org
Thu Oct 16 20:57:22 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 16 20:56:21 2014 +0200| [32705a02b60567a2cad08ef5766eae613f0394e4] | committer: Francois Cartegnie

demux: mp4: don't display zero trkn total

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

 modules/demux/mp4/meta.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mp4/meta.c b/modules/demux/mp4/meta.c
index 9e36897..4d1ab9f 100644
--- a/modules/demux/mp4/meta.c
+++ b/modules/demux/mp4/meta.c
@@ -323,7 +323,7 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
             char psz_trck[6];
             snprintf( psz_trck, sizeof( psz_trck ), "%"PRIu16, GetWBE(&BOXDATA(p_data)->p_blob[2]) );
             vlc_meta_SetTrackNum( p_meta, psz_trck );
-            if( BOXDATA(p_data)->i_blob >= 8 )
+            if( BOXDATA(p_data)->i_blob >= 8 && GetWBE(&BOXDATA(p_data)->p_blob[4]) )
             {
                 snprintf( psz_trck, sizeof( psz_trck ), "%"PRIu16, GetWBE(&BOXDATA(p_data)->p_blob[4]) );
                 vlc_meta_Set( p_meta, vlc_meta_TrackTotal, psz_trck );



More information about the vlc-commits mailing list