From ab1e1917209cfad00f56ac5f0a2fa854d377cd40 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 8 Jun 2014 16:34:20 +0200 Subject: [PATCH] avcodec/pthread_frame: Use av_mallocz_array() Signed-off-by: Michael Niedermayer --- libavcodec/pthread_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index e0b5f527a3..9e11038c52 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -631,7 +631,7 @@ int ff_frame_thread_init(AVCodecContext *avctx) avctx->internal->thread_ctx = fctx = av_mallocz(sizeof(FrameThreadContext)); - fctx->threads = av_mallocz(sizeof(PerThreadContext) * thread_count); + fctx->threads = av_mallocz_array(thread_count, sizeof(PerThreadContext)); pthread_mutex_init(&fctx->buffer_mutex, NULL); fctx->delaying = 1;