Commit 21e00619 authored by Denis Charmet's avatar Denis Charmet Committed by Jean-Baptiste Kempf

Handle possible negative timestamps in MKV

Fix #7751
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f51013b0
......@@ -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++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment