mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-01-30 12:32:43 +00:00
Fix crash if capture is stopped before completing startup
This commit is contained in:
parent
df1286ac88
commit
10ea67719e
@ -775,9 +775,12 @@ namespace video {
|
||||
}
|
||||
}
|
||||
|
||||
if (auto capture_ctx = capture_ctx_queue->pop()) {
|
||||
capture_ctxs.emplace_back(std::move(*capture_ctx));
|
||||
// Wait for the initial capture context or a request to stop the queue
|
||||
auto initial_capture_ctx = capture_ctx_queue->pop();
|
||||
if (!initial_capture_ctx) {
|
||||
return;
|
||||
}
|
||||
capture_ctxs.emplace_back(std::move(*initial_capture_ctx));
|
||||
|
||||
auto disp = platf::display(map_base_dev_type(encoder.base_dev_type), display_names[display_p], capture_ctxs.front().config);
|
||||
if (!disp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user