[vlc-devel] commit: Workaround for 0 being invalid timestamp. (Laurent Aimar )

git version control git at videolan.org
Wed Jul 29 22:48:00 CEST 2009


vlc | branch: 1.0-bugfix | Laurent Aimar <fenrir at videolan.org> | Mon Jul 27 21:26:30 2009 +0200| [f04521bb85906ee7c2e483fc311b9d68c7205816] | committer: Laurent Aimar 

Workaround for 0 being invalid timestamp.
(cherry picked from commit 6088f39f6b9111cc22a1f19c698ff3fc8c8c5ee6)

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

 modules/demux/mkv/mkv.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index a66d090..102a807 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -603,6 +603,12 @@ msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_b
             p_block->i_length = i_duration * 1000;
         }
 
+        /* FIXME remove when VLC_TS_INVALID work is done */
+        if( i == 0 || p_block->i_dts > 0 )
+            p_block->i_dts++;
+        if( !tk->b_dts_only && ( i == 0 || p_block->i_pts ) )
+            p_block->i_pts++;
+
         es_out_Send( p_demux->out, tk->p_es, p_block );
 
         /* use time stamp only for first block */
@@ -859,7 +865,8 @@ 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, p_sys->i_pts );
+        /* FIXME remove the +1 when VLC_TS_INVALID work is done */
+        es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts+1 );
 
         if( p_sys->i_pts >= p_sys->i_start_pts  )
         {




More information about the vlc-devel mailing list