[vlc-commits] commit: avcodec: use vlc_GetCPUCount() to set thread count also in encoder (Ilkka Ollakka )

git at videolan.org git at videolan.org
Tue May 4 12:32:43 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue May  4 13:31:53 2010 +0300| [05a68584b81fb871977c8ef1c90a9006f5d90b10] | committer: Ilkka Ollakka 

avcodec: use vlc_GetCPUCount() to set thread count also in encoder

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05a68584b81fb871977c8ef1c90a9006f5d90b10
---

 modules/codec/avcodec/encoder.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index a39abcc..1c0296e 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;



More information about the vlc-commits mailing list