mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
sys: Fix caps memory leak from pad template creation
https://bugzilla.gnome.org/show_bug.cgi?id=776076
This commit is contained in:
parent
60f41c7b81
commit
9be02ccb2a
3 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue