Commit b9831364 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/vc1dec: use av_realloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0a13487b
......@@ -5854,7 +5854,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
if (avctx->hwaccel ||
s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
buf_start_second_field = start;
tmp = av_realloc(slices, sizeof(*slices) * (n_slices+1));
tmp = av_realloc_array(slices, sizeof(*slices), (n_slices+1));
if (!tmp)
goto err;
slices = tmp;
......@@ -5879,7 +5879,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
break;
case VC1_CODE_SLICE: {
int buf_size3;
tmp = av_realloc(slices, sizeof(*slices) * (n_slices+1));
tmp = av_realloc_array(slices, sizeof(*slices), (n_slices+1));
if (!tmp)
goto err;
slices = tmp;
......@@ -5908,7 +5908,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
if (avctx->hwaccel ||
s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
buf_start_second_field = divider;
tmp = av_realloc(slices, sizeof(*slices) * (n_slices+1));
tmp = av_realloc_array(slices, sizeof(*slices), (n_slices+1));
if (!tmp)
goto err;
slices = tmp;
......
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