diff options
-rw-r--r-- | media/filters/vpx_video_decoder.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc index dc03400..4056323 100644 --- a/media/filters/vpx_video_decoder.cc +++ b/media/filters/vpx_video_decoder.cc @@ -17,6 +17,7 @@ #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/sys_byteorder.h" +#include "base/sys_info.h" #include "base/trace_event/trace_event.h" #include "media/base/bind_to_current_loop.h" #include "media/base/decoder_buffer.h" @@ -64,6 +65,8 @@ static int GetThreadCount(const VideoDecoderConfig& config) { decode_threads = 4; } + decode_threads = std::min(decode_threads, + base::SysInfo::NumberOfProcessors()); return decode_threads; } |