Commit 6b0063aa authored by Youness Alaoui's avatar Youness Alaoui Committed by Sebastian Dröge

appsrc: Fix memory leak with callback notify not being called in dispose

https://bugzilla.gnome.org/show_bug.cgi?id=733386
parent 69552ed8
......@@ -544,10 +544,18 @@ gst_app_src_dispose (GObject * obj)
GstAppSrc *appsrc = GST_APP_SRC_CAST (obj);
GstAppSrcPrivate *priv = appsrc->priv;
GST_OBJECT_LOCK (appsrc);
if (priv->caps) {
gst_caps_unref (priv->caps);
priv->caps = NULL;
}
if (priv->notify) {
priv->notify (priv->user_data);
}
priv->user_data = NULL;
priv->notify = NULL;
GST_OBJECT_UNLOCK (appsrc);
gst_app_src_flush_queued (appsrc);
G_OBJECT_CLASS (parent_class)->dispose (obj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment