mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-20 14:31:09 +00:00
mov: Don't allocate arrays with av_malloc that will be realloced
CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
6cc133ec58
commit
b698542ad8
@ -2373,7 +2373,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
if (!sc->ctts_count && sc->sample_count)
|
||||
{
|
||||
/* Complement ctts table if moov atom doesn't have ctts atom. */
|
||||
ctts_data = av_malloc(sizeof(*sc->ctts_data));
|
||||
ctts_data = av_realloc(NULL, sizeof(*sc->ctts_data));
|
||||
if (!ctts_data)
|
||||
return AVERROR(ENOMEM);
|
||||
sc->ctts_data = ctts_data;
|
||||
|
Loading…
Reference in New Issue
Block a user