You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/vc1dec: use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -5854,7 +5854,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
if (avctx->hwaccel ||
|
if (avctx->hwaccel ||
|
||||||
s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
|
s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
|
||||||
buf_start_second_field = start;
|
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)
|
if (!tmp)
|
||||||
goto err;
|
goto err;
|
||||||
slices = tmp;
|
slices = tmp;
|
||||||
@@ -5879,7 +5879,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
break;
|
break;
|
||||||
case VC1_CODE_SLICE: {
|
case VC1_CODE_SLICE: {
|
||||||
int buf_size3;
|
int buf_size3;
|
||||||
tmp = av_realloc(slices, sizeof(*slices) * (n_slices+1));
|
tmp = av_realloc_array(slices, sizeof(*slices), (n_slices+1));
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
goto err;
|
goto err;
|
||||||
slices = tmp;
|
slices = tmp;
|
||||||
@@ -5908,7 +5908,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
if (avctx->hwaccel ||
|
if (avctx->hwaccel ||
|
||||||
s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
|
s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
|
||||||
buf_start_second_field = divider;
|
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)
|
if (!tmp)
|
||||||
goto err;
|
goto err;
|
||||||
slices = tmp;
|
slices = tmp;
|
||||||
|
Reference in New Issue
Block a user