From ba9ef8d04ecd009036b7c380e71bac081c56c53e Mon Sep 17 00:00:00 2001 From: Alexander Strange Date: Tue, 29 Mar 2011 17:18:21 -0400 Subject: Remove unnecessary parameter from ff_thread_init() and fix behavior thread_count passed to ff_thread_init() is only used to set AVCodecContext. thread_count, and can be removed. Instead move it to the legacy implementation of avcodec_thread_init(). This also fixes the problem that calling avcodec_thread_init() with pthreads enabled did not set it since ff1efc524cb3c60f2f746e3b4550bb1a86c65316. Signed-off-by: Janne Grunau --- libavcodec/pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/pthread.c') diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index c40fde3a02..70845f0ba0 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -882,7 +882,7 @@ static void validate_thread_parameters(AVCodecContext *avctx) } } -int ff_thread_init(AVCodecContext *avctx, int thread_count) +int ff_thread_init(AVCodecContext *avctx) { if (avctx->thread_opaque) { av_log(avctx, AV_LOG_ERROR, "avcodec_thread_init is ignored after avcodec_open\n"); -- cgit v1.2.3