[vlc-commits] mp4: fix variable shadowing
Rémi Denis-Courmont
git at videolan.org
Thu Jun 29 22:35:42 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun 29 23:12:05 2017 +0300| [4d42cdf98da2542484730a2bb5c63f2300c26d0a] | committer: Rémi Denis-Courmont
mp4: fix variable shadowing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d42cdf98da2542484730a2bb5c63f2300c26d0a
---
modules/demux/mp4/mp4.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 2cc016f037..fa2564e25c 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -660,11 +660,9 @@ static int Open( vlc_object_t * p_this )
MP4_Box_t *p_ftyp;
MP4_Box_t *p_rmra;
- MP4_Box_t *p_trak;
const MP4_Box_t *p_mvhd = NULL;
const MP4_Box_t *p_mvex = NULL;
- unsigned int i;
bool b_enabled_es;
/* A little test to see if it could be a mp4 */
@@ -915,7 +913,7 @@ static int Open( vlc_object_t * p_this )
* check that at least 1 stream is enabled */
p_sys->p_tref_chap = NULL;
b_enabled_es = false;
- for( i = 0; i < p_sys->i_tracks; i++ )
+ for( unsigned i = 0; i < p_sys->i_tracks; i++ )
{
MP4_Box_t *p_trak = MP4_BoxGet( p_sys->p_root, "/moov/trak[%d]", i );
@@ -935,9 +933,9 @@ static int Open( vlc_object_t * p_this )
MP4_LoadMeta( p_sys, p_sys->p_meta );
/* now process each track and extract all useful information */
- for( i = 0; i < p_sys->i_tracks; i++ )
+ for( unsigned i = 0; i < p_sys->i_tracks; i++ )
{
- p_trak = MP4_BoxGet( p_sys->p_root, "/moov/trak[%d]", i );
+ MP4_Box_t *p_trak = MP4_BoxGet( p_sys->p_root, "/moov/trak[%u]", i );
MP4_TrackSetup( p_demux, &p_sys->track[i], p_trak, true, !b_enabled_es );
if( p_sys->track[i].b_ok && !p_sys->track[i].b_chapters_source )
More information about the vlc-commits
mailing list