[FFmpeg-cvslog] avcodec/pthread_frame: Use av_mallocz_array()

Michael Niedermayer git at videolan.org
Sun Jun 8 16:39:00 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun  8 16:34:20 2014 +0200| [ab1e1917209cfad00f56ac5f0a2fa854d377cd40] | committer: Michael Niedermayer

avcodec/pthread_frame: Use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab1e1917209cfad00f56ac5f0a2fa854d377cd40
---

 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 e0b5f52..9e11038 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;
 



More information about the ffmpeg-cvslog mailing list