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

Memory allocation error check

parent 12f7359b
...@@ -1116,6 +1116,10 @@ static int TrackCreateChunksIndex( demux_t *p_demux, ...@@ -1116,6 +1116,10 @@ static int TrackCreateChunksIndex( demux_t *p_demux,
} }
p_demux_track->chunk = calloc( p_demux_track->i_chunk_count, p_demux_track->chunk = calloc( p_demux_track->i_chunk_count,
sizeof( mp4_chunk_t ) ); sizeof( mp4_chunk_t ) );
if( p_demux_track->chunk == NULL )
{
return VLC_ENOMEM;
}
/* first we read chunk offset */ /* first we read chunk offset */
for( i_chunk = 0; i_chunk < p_demux_track->i_chunk_count; i_chunk++ ) for( i_chunk = 0; i_chunk < p_demux_track->i_chunk_count; i_chunk++ )
......
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