mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
gdkpixbuf: don't leak template caps
This commit is contained in:
parent
899d03dcc6
commit
226deb9b38
1 changed files with 4 additions and 2 deletions
|
@ -118,6 +118,7 @@ gst_gdk_pixbuf_get_capslist (void)
|
||||||
GSList *slist0;
|
GSList *slist0;
|
||||||
GstCaps *capslist = NULL;
|
GstCaps *capslist = NULL;
|
||||||
GstCaps *return_caps = NULL;
|
GstCaps *return_caps = NULL;
|
||||||
|
GstCaps *tmpl_caps;
|
||||||
|
|
||||||
capslist = gst_caps_new_empty ();
|
capslist = gst_caps_new_empty ();
|
||||||
slist0 = gdk_pixbuf_get_formats ();
|
slist0 = gdk_pixbuf_get_formats ();
|
||||||
|
@ -137,9 +138,10 @@ gst_gdk_pixbuf_get_capslist (void)
|
||||||
}
|
}
|
||||||
g_slist_free (slist0);
|
g_slist_free (slist0);
|
||||||
|
|
||||||
return_caps = gst_caps_intersect (capslist,
|
tmpl_caps = gst_static_caps_get (&gst_gdk_pixbuf_sink_template.static_caps);
|
||||||
gst_static_caps_get (&gst_gdk_pixbuf_sink_template.static_caps));
|
return_caps = gst_caps_intersect (capslist, tmpl_caps);
|
||||||
|
|
||||||
|
gst_caps_unref (tmpl_caps);
|
||||||
gst_caps_unref (capslist);
|
gst_caps_unref (capslist);
|
||||||
return return_caps;
|
return return_caps;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue