Commit 0234568c authored by Miroslav Goncharenko's avatar Miroslav Goncharenko Committed by Oleg Nabiullin

hevc_parser: fixed static analysis issue

std::thread::hardware_concurrency may return 0 if it fails to get info from HW
parent d8a250c4
......@@ -50,7 +50,7 @@ Parser::Parser(Bs32u mode)
if (m_mode & ASYNC)
{
hwThreads = std::thread::hardware_concurrency();
hwThreads = std::max(1u, std::thread::hardware_concurrency());
m_asyncAUMax = hwThreads * 2;
}
......
......@@ -50,7 +50,7 @@ Parser::Parser(Bs32u mode)
if (m_mode & ASYNC)
{
hwThreads = std::thread::hardware_concurrency();
hwThreads = std::max(1u, std::thread::hardware_concurrency());
m_asyncAUMax = hwThreads * 2;
}
......
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