mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-07-02 00:06:09 -04:00
gstpipewiresrc: Add a wait_negotiated() call to create()
Add a wait_negotiated() call to gst_pipewire_src_create(). This works around a race-condition that we experience where the function is called after the state is transitioning to paused, and after a SPA_PARAM_Format with a NULL parameter has been passed. That event is handled in the pipewire source by setting its negotiated flag to False, which results in gst_pipewire_src_create() returning GST_FLOW_NOT_NEGOTIATED, resulting in a failed stream attempt. With this change, the stream survives the state change. Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
This commit is contained in:
parent
8d93b779cd
commit
551eb0a473
1 changed files with 4 additions and 2 deletions
|
|
@ -1574,8 +1574,10 @@ gst_pipewire_src_create (GstPushSrc * psrc, GstBuffer ** buffer)
|
|||
pwsrc = GST_PIPEWIRE_SRC (psrc);
|
||||
|
||||
pw_thread_loop_lock (pwsrc->stream->core->loop);
|
||||
if (!pwsrc->negotiated)
|
||||
goto not_negotiated;
|
||||
if (!pwsrc->negotiated) {
|
||||
if (wait_negotiated(pwsrc) == PW_STREAM_STATE_ERROR)
|
||||
goto not_negotiated;
|
||||
}
|
||||
|
||||
while (TRUE) {
|
||||
enum pw_stream_state state;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue