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

MKV: Use frame defaut duration for MKV lace pts

This is used in many other MKV demux and prevents the pts = dts = 0 in every lace.
Fix #5165
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent fdd1eae5
...@@ -617,7 +617,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock ...@@ -617,7 +617,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
if ( f_mandatory ) if ( f_mandatory )
p_block->i_dts = p_block->i_pts; p_block->i_dts = p_block->i_pts;
else else
p_block->i_dts = min( i_pts, tk->i_last_dts + (mtime_t)(tk->i_default_duration >> 10)); p_block->i_dts = min( i_pts, tk->i_last_dts + ( mtime_t )( tk->i_default_duration / 1000 ) );
} }
} }
tk->i_last_dts = p_block->i_dts; tk->i_last_dts = p_block->i_dts;
...@@ -639,7 +639,9 @@ msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_b ...@@ -639,7 +639,9 @@ msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_b
es_out_Send( p_demux->out, tk->p_es, p_block ); es_out_Send( p_demux->out, tk->p_es, p_block );
/* use time stamp only for first block */ /* use time stamp only for first block */
i_pts = VLC_TS_INVALID; i_pts = ( tk->i_default_duration )?
i_pts + ( mtime_t )( tk->i_default_duration / 1000 ):
VLC_TS_INVALID;
} }
} }
......
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