OSDN Git Service

avcodec/pthread_frame: Use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Jun 2014 14:34:20 +0000 (16:34 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 8 Jun 2014 14:34:20 +0000 (16:34 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pthread_frame.c

index e0b5f52..9e11038 100644 (file)
@@ -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;