Browse Source

avcodec/ac3enc_float: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 12 years ago
parent
commit
c8a1f10cf4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/ac3enc_float.c

+ 1
- 1
libavcodec/ac3enc_float.c View File

@@ -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…
Cancel
Save