Skip to content
Snippets Groups Projects
Commit b08e1792 authored by Marvin Scholz's avatar Marvin Scholz Committed by Hugo Beauzée-Luyssen
Browse files

demux: mp4: fix reading vpcC box

The VP Codec ISO Media File Format Binding specification
states that the VP codec configuration box (vpcC) extends the
FullBox and a FullBox starts with a 1 byte version followed by
3 bytes flags.

Even though we are not interested in the flags, we still have to
read them, else all following reads will read from the wrong position,
resulting in, among other things, bogus values in the i_codec_init_datasize
which is supposed to be always 0 for VP8 and VP9.
parent 33015966
No related branches found
No related tags found
1 merge request!891demux: mp4: fix reading vpcC box
Pipeline #159979 passed with stage
in 14 minutes and 57 seconds
......@@ -1911,13 +1911,18 @@ static int MP4_ReadBox_vpcC( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_ENTER( MP4_Box_data_vpcC_t, MP4_FreeBox_vpcC );
MP4_Box_data_vpcC_t *p_vpcC = p_box->data.p_vpcC;
if( p_box->i_size < 6 )
if( p_box->i_size < 9 )
MP4_READBOX_EXIT( 0 );
MP4_GET1BYTE( p_vpcC->i_version );
if( p_vpcC->i_version > 1 )
MP4_READBOX_EXIT( 0 );
/* Skip flags */
uint32_t i_flags;
MP4_GET3BYTES( i_flags );
VLC_UNUSED( i_flags );
MP4_GET1BYTE( p_vpcC->i_profile );
MP4_GET1BYTE( p_vpcC->i_level );
MP4_GET1BYTE( p_vpcC->i_bit_depth );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment