mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
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
1 changed files with 4 additions and 2 deletions
|
@ -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…
Reference in a new issue