Commit 76bd2a9c authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

demux: mp4: fix memleak on error

(cherry picked from commit 8f0ad2f30f7de6b8e9b10f372c2a9e49b4a35d25)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f4ec9920
......@@ -4058,7 +4058,11 @@ static int MP4_frg_GetChunk( demux_t *p_demux, MP4_Box_t *p_chunk, unsigned *i_t
ret->p_sample_delta_dts = calloc( ret->i_sample_count, sizeof( uint32_t ) );
if( !ret->p_sample_count_dts || !ret->p_sample_delta_dts )
{
free( ret->p_sample_count_dts );
free( ret->p_sample_delta_dts );
return VLC_ENOMEM;
}
ret->p_sample_count_pts = calloc( ret->i_sample_count, sizeof( uint32_t ) );
if( !ret->p_sample_count_pts )
......
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