summaryrefslogtreecommitdiff
path: root/libavcodec/shorten.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/shorten.c')
-rw-r--r--libavcodec/shorten.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index ef58aaa6aa..fc3a35e82a 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -141,7 +141,8 @@ static int allocate_buffers(ShortenContext *s)
return AVERROR(ENOMEM);
s->offset[chan] = tmp_ptr;
- tmp_ptr = av_realloc(s->decoded_base[chan], sizeof(int32_t)*(s->blocksize + s->nwrap));
+ tmp_ptr = av_realloc(s->decoded_base[chan], (s->blocksize + s->nwrap) *
+ sizeof(s->decoded_base[0][0]));
if (!tmp_ptr)
return AVERROR(ENOMEM);
s->decoded_base[chan] = tmp_ptr;