From 353c1f709de193f40381780316a6138f91834ded Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Wed, 15 Feb 2023 13:30:43 +0100 Subject: [PATCH] gstpipewiresrc: make stream errors permanent When pw_stream receives a proxy error it does not set its state to an error state on its own, commenting: ``` we just emit the state change here to inform the application. If this is supposed to be a permanent error, the app should do a pw_stream_set_error() ``` Until now this was not done in the pipewiresrc, resulting in the negotiation loop to not bail out after an error as a successive `pw_stream_get_state()` did not return an error state. Make the error permanent so negotiation errors make us take the appropriate error paths. --- src/gst/gstpipewiresrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gst/gstpipewiresrc.c b/src/gst/gstpipewiresrc.c index 9c5cf1f76..a73ca00ed 100644 --- a/src/gst/gstpipewiresrc.c +++ b/src/gst/gstpipewiresrc.c @@ -679,6 +679,7 @@ on_state_changed (void *data, case PW_STREAM_STATE_STREAMING: break; case PW_STREAM_STATE_ERROR: + pw_stream_set_error (pwsrc->stream, -EPIPE, "%s", error); GST_ELEMENT_ERROR (pwsrc, RESOURCE, FAILED, ("stream error: %s", error), (NULL)); break;