mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 13:50:50 +08: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>
(cherry picked from commit b698542ad8)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
committed by
Reinhard Tartler
parent
5bbee02ae0
commit
d149c14a22
@@ -2313,7 +2313,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;
|
||||
|
||||
Reference in New Issue
Block a user