summaryrefslogtreecommitdiff
path: root/libavcodec/flashsv2enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-15 23:00:52 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-15 23:00:52 +0100
commit71bd6ea0fada69dd562d2e9dc1cd67d07b5a7417 (patch)
treec12d2bd37ee84278ce724e1223d8e142e37b994b /libavcodec/flashsv2enc.c
parente7d85186d639a53a4563c5f65322190ae9ad8a83 (diff)
downloadffmpeg-71bd6ea0fada69dd562d2e9dc1cd67d07b5a7417.tar.gz
avcodec/flashsv2enc: use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flashsv2enc.c')
-rw-r--r--libavcodec/flashsv2enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index 1c016f2265..f74160a8a7 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -806,8 +806,8 @@ static int reconfigure_at_keyframe(FlashSV2Context * s, const uint8_t * image,
s->block_width = block_width;
s->block_height = block_height;
if (s->rows * s->cols > s->blocks_size / sizeof(Block)) {
- s->frame_blocks = av_realloc(s->frame_blocks, s->rows * s->cols * sizeof(Block));
- s->key_blocks = av_realloc(s->key_blocks, s->cols * s->rows * sizeof(Block));
+ s->frame_blocks = av_realloc_array(s->frame_blocks, s->rows, s->cols * sizeof(Block));
+ s->key_blocks = av_realloc_array(s->key_blocks, s->cols, s->rows * sizeof(Block));
if (!s->frame_blocks || !s->key_blocks) {
av_log(s->avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
return -1;