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

MKV: fix COOK/ATRAC3 seeking

Fixes #14210
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e99891e7
...@@ -595,6 +595,10 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock ...@@ -595,6 +595,10 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
{ {
memcpy( p_block->p_buffer, tk->p_compression_data->GetBuffer(), tk->p_compression_data->GetSize() ); memcpy( p_block->p_buffer, tk->p_compression_data->GetBuffer(), tk->p_compression_data->GetSize() );
} }
if ( b_key_picture )
p_block->i_flags |= BLOCK_FLAG_TYPE_I;
switch( tk->fmt.i_codec ) switch( tk->fmt.i_codec )
{ {
case VLC_CODEC_COOK: case VLC_CODEC_COOK:
...@@ -630,9 +634,6 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock ...@@ -630,9 +634,6 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
break; break;
} }
if ( b_key_picture )
p_block->i_flags |= BLOCK_FLAG_TYPE_I;
if( tk->fmt.i_cat != VIDEO_ES ) if( tk->fmt.i_cat != VIDEO_ES )
{ {
if ( tk->fmt.i_cat == NAV_ES ) if ( tk->fmt.i_cat == NAV_ES )
......
...@@ -183,6 +183,13 @@ void handle_real_audio(demux_t * p_demux, mkv_track_t * p_tk, block_t * p_blk, m ...@@ -183,6 +183,13 @@ void handle_real_audio(demux_t * p_demux, mkv_track_t * p_tk, block_t * p_blk, m
p_sys->p_subpackets[i] = NULL; p_sys->p_subpackets[i] = NULL;
} }
p_sys->i_subpacket = 0; p_sys->i_subpacket = 0;
if ( !( p_blk->i_flags & BLOCK_FLAG_TYPE_I) )
{
msg_Dbg( p_demux, "discard non-key preroll block in track %d at%"PRId64,
p_tk->i_number, i_pts );
return;
}
} }
if( p_tk->fmt.i_codec == VLC_CODEC_COOK || if( p_tk->fmt.i_codec == VLC_CODEC_COOK ||
......
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