[vlc-commits] MP4: do not set total tracks to 0
Jean-Baptiste Kempf
git at videolan.org
Tue Aug 20 15:28:19 CEST 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Aug 20 15:27:49 2013 +0200| [43eb32320d0f16d99bb041d84ae1722498479d13] | committer: Jean-Baptiste Kempf
MP4: do not set total tracks to 0
That doesn't really make sense
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=43eb32320d0f16d99bb041d84ae1722498479d13
---
modules/demux/mp4/mp4.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index b40f1c6..1ccd510 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1025,9 +1025,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
snprintf( psz_trck, sizeof( psz_trck ), "%i",
p_0xa9xxx->data.p_trkn->i_track_number );
vlc_meta_SetTrackNum( p_meta, psz_trck );
- snprintf( psz_trck, sizeof( psz_trck ), "%i",
- p_0xa9xxx->data.p_trkn->i_track_total );
- vlc_meta_Set( p_meta, vlc_meta_TrackTotal, psz_trck );
+ if( p_0xa9xxx->data.p_trkn->i_track_total > 0 )
+ {
+ snprintf( psz_trck, sizeof( psz_trck ), "%i",
+ p_0xa9xxx->data.p_trkn->i_track_total );
+ vlc_meta_Set( p_meta, vlc_meta_TrackTotal, psz_trck );
+ }
break;
}
case ATOM_0xa9cmt: /* Commment */
More information about the vlc-commits
mailing list