From: Ilkka Ollakka Date: Tue, 4 May 2010 10:31:53 +0000 (+0300) Subject: avcodec: use vlc_GetCPUCount() to set thread count also in encoder X-Git-Tag: 1.2.0-pre1~6776 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=05a68584b81fb871977c8ef1c90a9006f5d90b10;p=vlc avcodec: use vlc_GetCPUCount() to set thread count also in encoder --- diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c index a39abccc49..1c0296eb1d 100644 --- a/modules/codec/avcodec/encoder.c +++ b/modules/codec/avcodec/encoder.c @@ -503,7 +503,7 @@ int OpenEncoder( vlc_object_t *p_this ) if ( p_enc->i_threads >= 1 ) avcodec_thread_init( p_context, p_enc->i_threads ); else - avcodec_thread_init( p_context, 2 ); + avcodec_thread_init( p_context, vlc_GetCPUCount() ); if( p_sys->i_vtolerance > 0 ) p_context->bit_rate_tolerance = p_sys->i_vtolerance;