]> git.sesse.net Git - vlc/commitdiff
Fix many ES_OUT_RESET_PCR problems
authorDenis Charmet <typx@dinauz.org>
Wed, 17 Aug 2011 10:41:45 +0000 (12:41 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 18 Aug 2011 10:47:29 +0000 (12:47 +0200)
As blocks are in coding orders, calling ES_OUT_SET_PCR at each blocks increase to trigger ES_OUT_RESET_PCR.
The reference blocks should be in chronological order though.

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

index d1ccfb9c5aee6aebba94dd2341aeb0f9751a5ebf..88c84d53ea63796ed113593738545ef931264d7a 100644 (file)
@@ -715,8 +715,9 @@ static int Demux( demux_t *p_demux)
         else
             p_sys->i_pts = (p_sys->i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000;
 
-        /* */
-        es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pts );
+        /* The blocks are in coding order so we can safely consider that only references are in chronological order */
+        if( b_key_picture )
+            es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pts );
 
         if( p_sys->i_pts >= p_sys->i_start_pts  )
         {