Commit 05a68584 authored by Ilkka Ollakka's avatar Ilkka Ollakka

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

parent 8f2f41dc
...@@ -503,7 +503,7 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -503,7 +503,7 @@ int OpenEncoder( vlc_object_t *p_this )
if ( p_enc->i_threads >= 1 ) if ( p_enc->i_threads >= 1 )
avcodec_thread_init( p_context, p_enc->i_threads ); avcodec_thread_init( p_context, p_enc->i_threads );
else else
avcodec_thread_init( p_context, 2 ); avcodec_thread_init( p_context, vlc_GetCPUCount() );
if( p_sys->i_vtolerance > 0 ) if( p_sys->i_vtolerance > 0 )
p_context->bit_rate_tolerance = p_sys->i_vtolerance; p_context->bit_rate_tolerance = p_sys->i_vtolerance;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment