When we start and renegotiate, there is a moment where the stream is created but
not yet connected. Make sure all functions deal with this situation correctly
instead of erroring out.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681247
static gboolean
gst_pulsesrc_is_dead (GstPulseSrc * pulsesrc, gboolean check_stream)
{
+ if (!pulsesrc->stream_connected)
+ return TRUE;
+
if (!CONTEXT_OK (pulsesrc->context))
goto error;
pa_threaded_mainloop_lock (pulsesrc->mainloop);
pulsesrc->in_read = TRUE;
+ if (!pulsesrc->stream_connected)
+ goto not_connected;
+
if (pulsesrc->paused)
goto was_paused;
return sum;
/* ERRORS */
+not_connected:
+ {
+ GST_LOG_OBJECT (pulsesrc, "we are not connected");
+ goto unlock_and_fail;
+ }
was_paused:
{
GST_LOG_OBJECT (pulsesrc, "we are paused");