]> git.sesse.net Git - vlc/commitdiff
MKV: Always set an i_pts in a lace otherwise it disturbs seeking performance
authorSteve Lhomme <robUx4@videolabs.io>
Mon, 16 Mar 2015 09:45:54 +0000 (09:45 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 16 Mar 2015 13:33:01 +0000 (14:33 +0100)
Using VLC_PTS_INVALID disturbs seeking.

It only applies to audio frames which are meant to be contiguous.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mkv/mkv.cpp

index 7f4de6b41460661172ecb2ff52c6321541e86b0e..459328ea8b3d86c325d9ef91bcdadb65e4265e93 100644 (file)
@@ -719,10 +719,8 @@ msg_Dbg( p_demux, "block (track=%d) i_dts: %"PRId64" / i_pts: %"PRId64, tk->i_nu
 
         es_out_Send( p_demux->out, tk->p_es, p_block );
 
-        /* use time stamp only for first block */
-        i_pts = ( tk->i_default_duration )?
-                 i_pts + ( mtime_t )tk->i_default_duration:
-                 VLC_TS_INVALID;
+        // prepare the pts for the next frame in the lace
+        i_pts += tk->i_default_duration ? tk->i_default_duration : 1;
     }
 }