[vlc-commits] Fix many ES_OUT_RESET_PCR problems

Denis Charmet git at videolan.org
Thu Aug 18 12:47:52 CEST 2011


vlc | branch: master | Denis Charmet <typx at dinauz.org> | Wed Aug 17 12:41:45 2011 +0200| [42b80206331b35bf253dac614e8c97dc437b77af] | committer: Jean-Baptiste Kempf

Fix many ES_OUT_RESET_PCR problems

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 at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42b80206331b35bf253dac614e8c97dc437b77af
---

 modules/demux/mkv/mkv.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index d1ccfb9..88c84d5 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -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  )
         {



More information about the vlc-commits mailing list