Commit d6daa5e5 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mkv: fix single track opus playback

Only first frame in a block has timestamp, then (0) last_dts is never valid,
(1) PCR never sent, (2) track never selected by core, goto 1;
parent 4ba01f28
......@@ -656,8 +656,11 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
p_block->i_dts = min( i_pts, tk->i_last_dts + ( mtime_t )( tk->i_default_duration / 1000 ) );
}
}
if( tk->fmt.i_cat == VIDEO_ES || tk->fmt.i_cat == AUDIO_ES )
if( p_block->i_dts > VLC_TS_INVALID &&
( tk->fmt.i_cat == VIDEO_ES || tk->fmt.i_cat == AUDIO_ES ) )
{
tk->i_last_dts = p_block->i_dts;
}
#if 0
msg_Dbg( p_demux, "block i_dts: %"PRId64" / i_pts: %"PRId64, p_block->i_dts, p_block->i_pts);
......
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