demux: mp4: fix regression with disabled tracks
authorFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 12 Jul 2018 18:19:11 +0000 (20:19 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 12 Jul 2018 18:19:11 +0000 (20:19 +0200)
modules/demux/mp4/mp4.c

index 731cd25..7d72a3b 100644 (file)
@@ -3340,8 +3340,6 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
     /* do we launch this track by default ? */
     p_track->b_enable =
         ( ( BOXDATA(p_tkhd)->i_flags&MP4_TRACK_ENABLED ) != 0 );
-    if( !p_track->b_enable )
-        p_track->fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
 
     p_track->i_track_ID = BOXDATA(p_tkhd)->i_track_ID;
 
@@ -3584,6 +3582,9 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
         p_track->fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
     }
 
+    if( !p_track->b_enable )
+        p_track->fmt.i_priority = ES_PRIORITY_NOT_DEFAULTABLE;
+
     if( TrackCreateES( p_demux,
                        p_track, p_track->i_chunk,
                       (p_track->b_chapters_source || !b_create_es) ? NULL : &p_track->p_es ) )