Commit 4fa0611d authored by Rémi Duraffort's avatar Rémi Duraffort

Avoid a malloc(0)

parent 9aba65f7
......@@ -1688,10 +1688,13 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
if( p_avcC )
{
p_track->fmt.i_extra = p_avcC->data.p_avcC->i_avcC;
if( p_track->fmt.i_extra > 0 )
{
p_track->fmt.p_extra = malloc( p_avcC->data.p_avcC->i_avcC );
memcpy( p_track->fmt.p_extra, p_avcC->data.p_avcC->p_avcC,
p_track->fmt.i_extra );
}
}
else
{
msg_Err( p_demux, "missing avcC" );
......
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