mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avcodec/ac3enc_float: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9b467d3cd5
commit
c8a1f10cf4
@ -73,7 +73,7 @@ av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s)
|
||||
n = 1 << 9;
|
||||
n2 = n >> 1;
|
||||
|
||||
window = av_malloc(n * sizeof(*window));
|
||||
window = av_malloc_array(n, sizeof(*window));
|
||||
if (!window) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Cannot allocate memory.\n");
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user