Commit bf6f6714 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

MKV: don't use i_last_dts if it's invalid

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 70d44c22
......@@ -671,6 +671,8 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
// condition when the DTS is correct (keyframe or B frame == NOT P frame)
if ( b_key_picture || b_discardable_picture )
p_block->i_dts = p_block->i_pts;
else if ( tk->i_last_dts == VLC_TS_INVALID )
p_block->i_dts = i_pts;
else
p_block->i_dts = min( i_pts, tk->i_last_dts + ( mtime_t )tk->i_default_duration );
}
......
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