diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index c422e8ea8467a8bb605f1ec0704db87da7edfd0c..1cb9c7a689c2a1e2bf9acc7fb1ee65d626f726a7 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -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; #endif