Browse Source

avcodec/qtrleenc: use av_mallocz_array()

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

+ 1
- 1
libavcodec/qtrleenc.c View File

@@ -106,7 +106,7 @@ static av_cold int qtrle_encode_init(AVCodecContext *avctx)

s->rlecode_table = av_mallocz(s->logical_width);
s->skip_table = av_mallocz(s->logical_width);
s->length_table = av_mallocz((s->logical_width + 1)*sizeof(int));
s->length_table = av_mallocz_array(s->logical_width + 1, sizeof(int));
if (!s->skip_table || !s->length_table || !s->rlecode_table) {
av_log(avctx, AV_LOG_ERROR, "Error allocating memory.\n");
return AVERROR(ENOMEM);


Loading…
Cancel
Save