sys: Fix caps memory leak from pad template creation

https://bugzilla.gnome.org/show_bug.cgi?id=776076
This commit is contained in:
Garima Gaur 2016-12-14 13:10:18 +05:30 committed by Sebastian Dröge
parent 60f41c7b81
commit 9be02ccb2a
3 changed files with 15 additions and 0 deletions

View file

@ -364,6 +364,12 @@ gst_dshowaudiodec_base_init (gpointer klass)
/* register */
gst_element_class_add_pad_template (element_class, src);
gst_element_class_add_pad_template (element_class, sink);
if (sinkcaps)
gst_caps_unref(sinkcaps);
if (srccaps)
gst_caps_unref(srccaps);
}
static void

View file

@ -409,6 +409,12 @@ gst_dshowvideodec_base_init (gpointer klass)
gst_element_class_add_pad_template (element_class, src);
gst_element_class_add_pad_template (element_class, sink);
if (sinkcaps)
gst_caps_unref(sinkcaps);
if (srccaps)
gst_caps_unref(srccaps);
}
static void

View file

@ -360,6 +360,9 @@ gst_vdp_decoder_class_init (GstVdpDecoderClass * klass)
gst_element_class_add_pad_template (element_class, src_template);
if (src_caps)
gst_caps_unref (src_caps);
g_object_class_install_property (object_class,
PROP_DISPLAY, g_param_spec_string ("display", "Display", "X Display name",
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));