diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c index 9ab7c3475e..9e176985ee 100644 --- a/libavcodec/frame_thread_encoder.c +++ b/libavcodec/frame_thread_encoder.c @@ -168,7 +168,7 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){ c->parent_avctx = avctx; - c->task_fifo = av_fifo_alloc(sizeof(Task) * BUFFER_SIZE); + c->task_fifo = av_fifo_alloc_array(BUFFER_SIZE, sizeof(Task)); if(!c->task_fifo) goto fail;