mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/ape: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3662e251cb
commit
f289422a3e
@ -268,7 +268,7 @@ static int ape_read_header(AVFormatContext * s)
|
|||||||
ape->seektablelength / sizeof(*ape->seektable), ape->totalframes);
|
ape->seektablelength / sizeof(*ape->seektable), ape->totalframes);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
ape->frames = av_malloc(ape->totalframes * sizeof(APEFrame));
|
ape->frames = av_malloc_array(ape->totalframes, sizeof(APEFrame));
|
||||||
if(!ape->frames)
|
if(!ape->frames)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
ape->firstframe = ape->junklength + ape->descriptorlength + ape->headerlength + ape->seektablelength + ape->wavheaderlength;
|
ape->firstframe = ape->junklength + ape->descriptorlength + ape->headerlength + ape->seektablelength + ape->wavheaderlength;
|
||||||
|
Loading…
Reference in New Issue
Block a user