Commit e587ce36 authored by Laurent Aimar's avatar Laurent Aimar

Clip number of thread to 16 when using threaded decoding in avcodec.

It workarounds an avcodec issue.
parent 5539fea7
......@@ -345,6 +345,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
int i_thread_count = var_InheritInteger( p_dec, "ffmpeg-threads" );
if( i_thread_count <= 0 )
i_thread_count = vlc_GetCPUCount();
i_thread_count = __MIN( i_thread_count, 16 );
msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count );
p_sys->p_context->thread_count = i_thread_count;
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