mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
gst: handle stream create error
This commit is contained in:
parent
c546167ad3
commit
48dea3d5ea
1 changed files with 10 additions and 1 deletions
|
|
@ -648,7 +648,9 @@ gst_pipewire_sink_start (GstBaseSink * basesink)
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_thread_loop_lock (pwsink->loop);
|
pw_thread_loop_lock (pwsink->loop);
|
||||||
pwsink->stream = pw_stream_new (pwsink->core, pwsink->client_name, props);
|
if ((pwsink->stream = pw_stream_new (pwsink->core, pwsink->client_name, props)) == NULL)
|
||||||
|
goto no_stream;
|
||||||
|
|
||||||
pwsink->pool->stream = pwsink->stream;
|
pwsink->pool->stream = pwsink->stream;
|
||||||
|
|
||||||
pw_stream_add_listener(pwsink->stream,
|
pw_stream_add_listener(pwsink->stream,
|
||||||
|
|
@ -659,6 +661,13 @@ gst_pipewire_sink_start (GstBaseSink * basesink)
|
||||||
pw_thread_loop_unlock (pwsink->loop);
|
pw_thread_loop_unlock (pwsink->loop);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
no_stream:
|
||||||
|
{
|
||||||
|
GST_ELEMENT_ERROR (pwsink, RESOURCE, FAILED, ("can't create stream"), (NULL));
|
||||||
|
pw_thread_loop_unlock (pwsink->loop);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue