[vlc-devel] [PATCH] Handle possible negative timestamps in MKV

Denis Charmet typx at dinauz.org
Tue Nov 20 21:27:19 CET 2012


Fix #7751
---
 modules/demux/mkv/mkv.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 6834367..c2d5478 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -722,9 +722,9 @@ static int Demux( demux_t *p_demux)
         }
 
         if( simpleblock != NULL )
-            p_sys->i_pts = p_sys->i_chapter_time + ( simpleblock->GlobalTimecode() / (mtime_t) 1000 );
+            p_sys->i_pts = p_sys->i_chapter_time + ( (mtime_t)simpleblock->GlobalTimecode() / INT64_C(1000) );
         else
-            p_sys->i_pts = p_sys->i_chapter_time + ( block->GlobalTimecode() / (mtime_t) 1000 );
+            p_sys->i_pts = p_sys->i_chapter_time + ( (mtime_t)block->GlobalTimecode() / INT64_C(1000) );
 
         mtime_t i_pcr = VLC_TS_INVALID;
         for( size_t i = 0; i < p_segment->tracks.size(); i++)
-- 
1.7.10.4




More information about the vlc-devel mailing list