appsrc: always take mutex before object lock
The locking order is to first take the appsrc mutex and then the object lock. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=693224
This commit is contained in:
parent
ebf24e292e
commit
d4ed3ddf6f
@ -1107,6 +1107,8 @@ gst_app_src_set_caps (GstAppSrc * appsrc, const GstCaps * caps)
|
||||
|
||||
priv = appsrc->priv;
|
||||
|
||||
g_mutex_lock (&priv->mutex);
|
||||
|
||||
GST_OBJECT_LOCK (appsrc);
|
||||
GST_DEBUG_OBJECT (appsrc, "setting caps to %" GST_PTR_FORMAT, caps);
|
||||
if ((old = priv->caps) != caps) {
|
||||
@ -1116,11 +1118,11 @@ gst_app_src_set_caps (GstAppSrc * appsrc, const GstCaps * caps)
|
||||
priv->caps = NULL;
|
||||
if (old)
|
||||
gst_caps_unref (old);
|
||||
g_mutex_lock (&priv->mutex);
|
||||
priv->new_caps = TRUE;
|
||||
g_mutex_unlock (&priv->mutex);
|
||||
}
|
||||
GST_OBJECT_UNLOCK (appsrc);
|
||||
|
||||
g_mutex_unlock (&priv->mutex);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user