Fixes #14210
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
{
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 )
{
case VLC_CODEC_COOK:
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 == NAV_ES )
p_sys->p_subpackets[i] = NULL;
}
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 ||