aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-03 19:18:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-03 20:08:18 +0200
commitcc861581735b08817c7fbacd38ffab73fb9fe38a (patch)
tree0e67dbfc0112adaba89f6d551af89847760bdf3d /libavcodec
parentd53e87a837161bb7918ae9822019903a8239e501 (diff)
downloadffmpeg-cc861581735b08817c7fbacd38ffab73fb9fe38a.tar.gz
avcodec/ffv1dec: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index d7dd110545..a0a50abed4 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -380,10 +380,10 @@ static int decode_slice(AVCodecContext *c, void *arg)
pdst->vlc_state = NULL;
if (fssrc->ac) {
- pdst->state = av_malloc(CONTEXT_SIZE * psrc->context_count);
+ pdst->state = av_malloc_array(CONTEXT_SIZE, psrc->context_count);
memcpy(pdst->state, psrc->state, CONTEXT_SIZE * psrc->context_count);
} else {
- pdst->vlc_state = av_malloc(sizeof(*pdst->vlc_state) * psrc->context_count);
+ pdst->vlc_state = av_malloc_array(sizeof(*pdst->vlc_state), psrc->context_count);
memcpy(pdst->vlc_state, psrc->vlc_state, sizeof(*pdst->vlc_state) * psrc->context_count);
}
}