]> git.sesse.net Git - vlc/blobdiff - modules/demux/mp4/mp4.c
Respect mp4 track enable flag.
[vlc] / modules / demux / mp4 / mp4.c
index a3fdcd28d4e038c4aa9bafc175c35f8e00b6dd14..f669c1cda1e7497cbafecbcc943f1cb58d46e6df 100644 (file)
@@ -403,8 +403,9 @@ static int Open( vlc_object_t * p_this )
                     if( end ) end[1] = '\0';
                     else *psz_path = '\0';
 
-                    asprintf( &psz_absolute, "%s://%s%s",
-                                  p_demux->psz_access, psz_path, psz_ref );
+                    if( asprintf( &psz_absolute, "%s://%s%s",
+                                  p_demux->psz_access, psz_path, psz_ref ) < 0 )
+                        return VLC_ENOMEM;
 
                     free( psz_ref );
                     psz_ref = psz_absolute;
@@ -1988,6 +1989,8 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
     /* do we launch this track by default ? */
     p_track->b_enable =
         ( ( p_tkhd->data.p_tkhd->i_flags&MP4_TRACK_ENABLED ) != 0 );
+    if( !p_track->b_enable )
+        p_track->fmt.i_priority = -1;
 
     p_track->i_track_ID = p_tkhd->data.p_tkhd->i_track_ID;
     p_track->i_width = p_tkhd->data.p_tkhd->i_width / 65536;