aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-18 18:57:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-18 20:43:02 +0200
commit60c8c7144e1df36f1399a11f4085f10e4c5b1ef5 (patch)
treea24c99ac9aa86af0ada2e95305f91d89229552fd
parent683b6e3183ee48dcb25e86755c2125fd3bd8fdba (diff)
downloadffmpeg-60c8c7144e1df36f1399a11f4085f10e4c5b1ef5.tar.gz
avcodec/qtrleenc: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/qtrleenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index 7f9525abe0..8750e3097a 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -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);