output/httpd: no mutex lock while reading data from encoder
This commit is contained in:
parent
72146e7800
commit
72008d951b
@ -341,10 +341,12 @@ HttpdOutput::BroadcastFromEncoder()
|
||||
const std::lock_guard<Mutex> lock(mutex);
|
||||
while (!pages.empty())
|
||||
cond.wait(mutex);
|
||||
}
|
||||
|
||||
PagePtr page;
|
||||
while ((page = ReadPage()) != nullptr)
|
||||
pages.push(page);
|
||||
PagePtr page;
|
||||
while ((page = ReadPage()) != nullptr) {
|
||||
const std::lock_guard<Mutex> lock(mutex);
|
||||
pages.push(std::move(page));
|
||||
}
|
||||
|
||||
DeferredMonitor::Schedule();
|
||||
|
Loading…
Reference in New Issue
Block a user