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}
This commit is contained in:
Jan Grulich
2022-08-30 11:35:49 +02:00
committed by WebRTC LUCI CQ
parent 1d659d67b1
commit 8bff1a81cb

View File

@ -179,11 +179,12 @@ void SharedScreenCastStreamPrivate::OnCoreError(void* data,
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,