This is needed as a concurrent state change could pull the context or
stream out from under our feet.
https://bugzilla.gnome.org/show_bug.cgi?id=686459
if (pbuf == NULL)
goto done;
if (pbuf == NULL)
goto done;
+ GST_OBJECT_LOCK (pbuf);
pa_threaded_mainloop_lock (mainloop);
if (pbuf->context == NULL)
pa_threaded_mainloop_lock (mainloop);
if (pbuf->context == NULL)
}
pa_threaded_mainloop_unlock (mainloop);
}
pa_threaded_mainloop_unlock (mainloop);
+ GST_OBJECT_UNLOCK (pbuf);
gst_caps_replace (&spec.caps, NULL);
gst_object_unref (pbuf);
gst_caps_replace (&spec.caps, NULL);
gst_object_unref (pbuf);