mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/pthread_frame: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
007547b282
commit
ab1e191720
@ -631,7 +631,7 @@ int ff_frame_thread_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
avctx->internal->thread_ctx = fctx = av_mallocz(sizeof(FrameThreadContext));
|
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);
|
pthread_mutex_init(&fctx->buffer_mutex, NULL);
|
||||||
fctx->delaying = 1;
|
fctx->delaying = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user