Commit cd74f7f8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Cleanup MP4 ftyp

parent ba67168b
...@@ -369,6 +369,7 @@ static int MP4_ReadBoxSkip( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -369,6 +369,7 @@ static int MP4_ReadBoxSkip( stream_t *p_stream, MP4_Box_t *p_box )
static int MP4_ReadBox_ftyp( stream_t *p_stream, MP4_Box_t *p_box ) static int MP4_ReadBox_ftyp( stream_t *p_stream, MP4_Box_t *p_box )
{ {
unsigned code = 0;
MP4_READBOX_ENTER( MP4_Box_data_ftyp_t ); MP4_READBOX_ENTER( MP4_Box_data_ftyp_t );
MP4_GETFOURCC( p_box->data.p_ftyp->i_major_brand ); MP4_GETFOURCC( p_box->data.p_ftyp->i_major_brand );
...@@ -382,7 +383,7 @@ static int MP4_ReadBox_ftyp( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -382,7 +383,7 @@ static int MP4_ReadBox_ftyp( stream_t *p_stream, MP4_Box_t *p_box )
sizeof(uint32_t)); sizeof(uint32_t));
if( tab == NULL ) if( tab == NULL )
p_box->data.p_ftyp->i_compatible_brands_count = 0; goto error;
for( i =0; i < p_box->data.p_ftyp->i_compatible_brands_count; i++ ) for( i =0; i < p_box->data.p_ftyp->i_compatible_brands_count; i++ )
{ {
...@@ -393,8 +394,10 @@ static int MP4_ReadBox_ftyp( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -393,8 +394,10 @@ static int MP4_ReadBox_ftyp( stream_t *p_stream, MP4_Box_t *p_box )
{ {
p_box->data.p_ftyp->i_compatible_brands = NULL; p_box->data.p_ftyp->i_compatible_brands = NULL;
} }
code = 1;
MP4_READBOX_EXIT( 1 ); error:
MP4_READBOX_EXIT( code );
} }
static void MP4_FreeBox_ftyp( MP4_Box_t *p_box ) static void MP4_FreeBox_ftyp( MP4_Box_t *p_box )
......
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