Commit f1bf530a authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf
Browse files

mkv: set p_sys->i_pts in a little bit cleaner way



No real change in terms of semantics, but the code is now (a little bit)
easier to read.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 33b8d46f
......@@ -733,11 +733,6 @@ static int Demux( demux_t *p_demux)
return 0;
}
if( simpleblock != NULL )
p_sys->i_pts = (mtime_t)simpleblock->GlobalTimecode() / INT64_C(1000);
else
p_sys->i_pts = (mtime_t)block->GlobalTimecode() / INT64_C(1000);
p_sys->i_pts += p_sys->i_mk_chapter_time + VLC_TS_0;
......@@ -775,6 +770,14 @@ static int Demux( demux_t *p_demux)
}
}
/* set pts */
{
p_sys->i_pts = p_sys->i_mk_chapter_time + VLC_TS_0;
if( simpleblock != NULL ) p_sys->i_pts += simpleblock->GlobalTimecode() / INT64_C( 1000 );
else p_sys->i_pts += block->GlobalTimecode() / INT64_C( 1000 );
}
if ( p_vsegment->CurrentEdition() &&
p_vsegment->CurrentEdition()->b_ordered &&
p_vsegment->CurrentChapter() == NULL )
......
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