vlc | branch: master | Denis Charmet <[email protected]> | Tue Nov 20 21:27:19 
2012 +0100| [21e0061982a62df352cf06442c0edfa3f38eb48e] | committer: 
Jean-Baptiste Kempf

Handle possible negative timestamps in MKV

Fix #7751

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 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++)

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to