Commit 11489bdb authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

MKV: reject invalid real audio data

parent 137c37b8
......@@ -1262,8 +1262,14 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
p_fmt->audio.i_rate = 8000;
p_fmt->audio.i_blockalign = 0x14;
}
else
else if( p_tk->i_extra_data > 28 )
{
uint8_t *p = p_tk->p_extra_data;
if( memcmp( p, ".ra", 3 ) ) {
msg_Err( &sys.demuxer, "Invalid Real ExtraData 0x%4.4s", (char *)p );
p_tk->fmt.i_codec = VLC_FOURCC( 'u', 'n', 'd', 'f' );
}
else {
if( !strcmp( p_tk->psz_codec, "A_REAL/COOK" ) )
p_tk->fmt.i_codec = VLC_CODEC_COOK;
else if( !strcmp( p_tk->psz_codec, "A_REAL/ATRC" ) )
......@@ -1275,6 +1281,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
fill_extra_data( p_tk, p_tk->fmt.i_codec == VLC_CODEC_RA_288 ? 0 : 78);
}
}
}
else if( !strcmp( p_tk->psz_codec, "S_KATE" ) )
{
p_tk->fmt.i_codec = VLC_CODEC_KATE;
......
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