]> git.sesse.net Git - vlc/commitdiff
Do not recreate the decoder when unneeded (mp4).
authorLaurent Aimar <fenrir@videolan.org>
Fri, 21 Nov 2008 20:28:26 +0000 (21:28 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 22 Nov 2008 12:47:25 +0000 (13:47 +0100)
modules/demux/mp4/mp4.c

index 369c6322387c0bf31bf830df1fe4e135c4bd40d8..36469afc084286799b91fa4090afb4283e22c2d0 100644 (file)
@@ -1958,9 +1958,9 @@ static int TrackGotoChunkSample( demux_t *p_demux, mp4_track_t *p_track,
     bool b_reselect = false;
 
     /* now see if actual es is ok */
-    if( (p_track->i_chunk >= p_track->i_chunk_count - 1) ||
-        (p_track->chunk[p_track->i_chunk].i_sample_description_index !=
-            p_track->chunk[i_chunk].i_sample_description_index) )
+    if( p_track->i_chunk >= p_track->i_chunk_count ||
+        p_track->chunk[p_track->i_chunk].i_sample_description_index !=
+            p_track->chunk[i_chunk].i_sample_description_index )
     {
         msg_Warn( p_demux, "recreate ES for track[Id 0x%x]",
                   p_track->i_track_ID );