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);
|
const std::lock_guard<Mutex> lock(mutex);
|
||||||
while (!pages.empty())
|
while (!pages.empty())
|
||||||
cond.wait(mutex);
|
cond.wait(mutex);
|
||||||
|
}
|
||||||
|
|
||||||
PagePtr page;
|
PagePtr page;
|
||||||
while ((page = ReadPage()) != nullptr)
|
while ((page = ReadPage()) != nullptr) {
|
||||||
pages.push(page);
|
const std::lock_guard<Mutex> lock(mutex);
|
||||||
|
pages.push(std::move(page));
|
||||||
}
|
}
|
||||||
|
|
||||||
DeferredMonitor::Schedule();
|
DeferredMonitor::Schedule();
|
||||||
|
Loading…
Reference in New Issue
Block a user