]> git.sesse.net Git - vlc/commitdiff
mkv.cpp: seeking is not only based on video
authorSteve Lhomme <robux@videolan.org>
Wed, 16 Mar 2005 21:26:43 +0000 (21:26 +0000)
committerSteve Lhomme <robux@videolan.org>
Wed, 16 Mar 2005 21:26:43 +0000 (21:26 +0000)
modules/demux/mkv.cpp

index 7a931ec62112c9894dd815fcf61dee470e5fcd85..96e2ed2c3f5cc165ef5527b6be83175255868717 100644 (file)
@@ -1715,7 +1715,12 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, const chap
 
         if( i_track < p_segment->tracks.size() )
         {
-            if( tk->fmt.i_cat == VIDEO_ES )
+            if( p_sys->i_pts >= p_sys->i_start_pts )
+            {
+                BlockDecode( p_demux, block, p_sys->i_pts, 0 );
+                i_track_skipping = 0;
+            }
+            else if( tk->fmt.i_cat == VIDEO_ES )
             {
                 if( i_block_ref1 == -1 && tk->b_search_keyframe )
                 {
@@ -1726,7 +1731,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, const chap
                 {
                     BlockDecode( p_demux, block, p_sys->i_pts, 0 );
                 }
-            }
+            } 
         }
 
         delete block;