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 ff1efc524c.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
This commit is contained in:
Alexander Strange
2011-03-29 17:18:21 -04:00
committed by Janne Grunau
parent d6f66edd65
commit ba9ef8d04e
4 changed files with 10 additions and 11 deletions

View File

@@ -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");