Commit e4eba9e2 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/mss4: use av_malloc_array()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent fd6768a4
...@@ -650,7 +650,7 @@ static av_cold int mss4_decode_init(AVCodecContext *avctx) ...@@ -650,7 +650,7 @@ static av_cold int mss4_decode_init(AVCodecContext *avctx)
} }
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
c->dc_stride[i] = FFALIGN(avctx->width, 16) >> (2 + !!i); c->dc_stride[i] = FFALIGN(avctx->width, 16) >> (2 + !!i);
c->prev_dc[i] = av_malloc(sizeof(**c->prev_dc) * c->dc_stride[i]); c->prev_dc[i] = av_malloc_array(c->dc_stride[i], sizeof(**c->prev_dc));
if (!c->prev_dc[i]) { if (!c->prev_dc[i]) {
av_log(avctx, AV_LOG_ERROR, "Cannot allocate buffer\n"); av_log(avctx, AV_LOG_ERROR, "Cannot allocate buffer\n");
mss4_free_vlcs(c); mss4_free_vlcs(c);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment