directsoundsrc: Avoid leaking copy of caps object

gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
so creating a copy using gst_caps_copy() results in a reference leak.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734536
This commit is contained in:
Sebastian Rasmussen 2014-08-09 13:22:42 +02:00 committed by Tim-Philipp Müller
parent b323fba934
commit 6d151843ef

View file

@ -201,8 +201,7 @@ gst_directsound_src_getcaps (GstBaseSrc * bsrc, GstCaps * filter)
GstCaps *caps = NULL;
GST_DEBUG_OBJECT (bsrc, "get caps");
caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD
(bsrc)));
caps = gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (bsrc));
return caps;
}