Commit 58f42e28 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

AVcodec: limit the number of auto-detected threads to 4 by default

Revert this when you have found the reason why it fails for soo many
people, in avi, mp4 (and mkv before the HACK)
(cherry picked from commit ce85748bd0dcc074d69c71d51ead53968eebeb9e)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 095c9ba8
...@@ -341,6 +341,9 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, ...@@ -341,6 +341,9 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
i_thread_count = vlc_GetCPUCount(); i_thread_count = vlc_GetCPUCount();
if( i_thread_count > 1 ) if( i_thread_count > 1 )
i_thread_count++; i_thread_count++;
//FIXME: take in count the decoding time
i_thread_count = __MIN( i_thread_count, 4 );
} }
i_thread_count = __MIN( i_thread_count, 16 ); i_thread_count = __MIN( i_thread_count, 16 );
msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count ); msg_Dbg( p_dec, "allowing %d thread(s) for decoding", 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