summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/pipewire/pipewire/0003-gstpipewiresrc-break-out-of-wait_started-also-on-STA.patch
blob: 29bc504728db8e9aa0d5b226b6ca36c52344b2fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 4fb8417b201033ae2de20032b44d52cae1394ff8 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Wed, 8 Nov 2023 18:23:02 +0200
Subject: [PATCH 2/2] gstpipewiresrc: break out of wait_started() also on
 STATE_UNCONNECTED

When the session manager sends an error to the client, it typically
also destroys the node after the error, which causes the stream to go
to STATE_UNCONNECTED via proxy_removed(). In that case, make sure
we exit the loop early, otherwise it will take 30 seconds to unblock
gst_element_set_state()

Upstream-Status: Pipewire MR1763 merged
---
 src/gst/gstpipewiresrc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gst/gstpipewiresrc.c b/src/gst/gstpipewiresrc.c
index e473338ba..e3b86b373 100644
--- a/src/gst/gstpipewiresrc.c
+++ b/src/gst/gstpipewiresrc.c
@@ -783,10 +783,9 @@ wait_started (GstPipeWireSrc *this)
     GST_DEBUG_OBJECT (this, "waiting for started signal, state now %s",
         pw_stream_state_as_string (state));

-    if (state == PW_STREAM_STATE_ERROR)
-      break;
-
-    if (this->flushing) {
+    if (state == PW_STREAM_STATE_ERROR ||
+        state == PW_STREAM_STATE_UNCONNECTED ||
+        this->flushing) {
       state = PW_STREAM_STATE_ERROR;
       break;
     }
--
2.41.0