Do not block PipeWire thread loop in case of an error
We might be potentially blocking PipeWire initialization with call to
pw_thread_loop_wait() and waiting undefinitely for response in case
there is a fatal error.
Bug: webrtc:13429
Change-Id: If169e04f75a7d24a03a0fcd0da9ffaba8c0e2ef7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273481
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#37959}
diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
index 8fc5544..99cfa6f 100644
--- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
+++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
@@ -179,11 +179,12 @@
int seq,
int res,
const char* message) {
- SharedScreenCastStreamPrivate* that =
+ SharedScreenCastStreamPrivate* stream =
static_cast<SharedScreenCastStreamPrivate*>(data);
- RTC_DCHECK(that);
+ RTC_DCHECK(stream);
RTC_LOG(LS_ERROR) << "PipeWire remote error: " << message;
+ pw_thread_loop_signal(stream->pw_main_loop_, false);
}
void SharedScreenCastStreamPrivate::OnCoreInfo(void* data,