Commit 18e445ad authored by Francois Cartegnie's avatar Francois Cartegnie

demux: libmp4: don't fail, just skip broken compressor name

parent b0b848e1
......@@ -2135,10 +2135,13 @@ int MP4_ReadBox_sample_vide( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_sample_vide->i_qt_data_size );
MP4_GET2BYTES( p_box->data.p_sample_vide->i_qt_frame_count );
if ( i_read < 32 || p_peek[0] > 31 ) // Pascal String
if ( i_read < 32 )
MP4_READBOX_EXIT( 0 );
memcpy( &p_box->data.p_sample_vide->sz_compressorname, &p_peek[1], p_peek[0] );
p_box->data.p_sample_vide->sz_compressorname[p_peek[0]] = 0;
if( p_peek[0] <= 31 ) // Must be Pascal String
{
memcpy( &p_box->data.p_sample_vide->sz_compressorname, &p_peek[1], p_peek[0] );
p_box->data.p_sample_vide->sz_compressorname[p_peek[0]] = 0;
}
p_peek += 32; i_read -= 32;
MP4_GET2BYTES( p_box->data.p_sample_vide->i_depth );
......
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