mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
appsrc: Fix memory leak with callback notify not being called in dispose
https://bugzilla.gnome.org/show_bug.cgi?id=733386
This commit is contained in:
parent
69552ed81b
commit
6b0063aab5
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue