mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-28 23:09:59 +02:00
mp4: return early when missing sbgp box and use do{}while()
Fixes an uninitialized warning, probably due to the for() with no initializer.
This commit is contained in:
parent
4ad6c8f703
commit
1590221b61
@ -367,7 +367,10 @@ static const MP4_Box_data_sbgp_entry_t *
|
||||
{
|
||||
const MP4_Box_t *p_sbgp = MP4_BoxGet( p_node, "sbgp" );
|
||||
const MP4_Box_data_sbgp_t *p_sbgp_data;
|
||||
for( ; p_sbgp; p_sbgp = p_sbgp->p_next )
|
||||
if( !p_sbgp )
|
||||
return NULL;
|
||||
|
||||
do
|
||||
{
|
||||
p_sbgp_data = BOXDATA(p_sbgp);
|
||||
if( p_sbgp->i_type == ATOM_sbgp && p_sbgp_data &&
|
||||
@ -375,7 +378,8 @@ static const MP4_Box_data_sbgp_entry_t *
|
||||
(i_grouping_type_parameter == 0 ||
|
||||
p_sbgp_data->i_grouping_type_parameter == i_grouping_type_parameter) )
|
||||
break;
|
||||
}
|
||||
p_sbgp = p_sbgp->p_next;
|
||||
} while(p_sbgp);
|
||||
|
||||
if( !p_sbgp )
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user