decoder/Control: pass std::unique_lock<> to Cond::wait()

This commit is contained in:
Max Kellermann
2019-04-26 18:34:16 +02:00
parent 23d56cb6a1
commit cf348f9fae
5 changed files with 68 additions and 62 deletions

View File

@@ -487,7 +487,7 @@ DecoderControl::RunThread() noexcept
{
SetThreadName("decoder");
const std::lock_guard<Mutex> protect(mutex);
std::unique_lock<Mutex> lock(mutex);
do {
assert(state == DecoderState::STOP ||
@@ -528,7 +528,7 @@ DecoderControl::RunThread() noexcept
break;
case DecoderCommand::NONE:
Wait();
Wait(lock);
break;
}
} while (command != DecoderCommand::NONE || !quit);