Commit 6d151843 authored by Sebastian Rasmussen's avatar Sebastian Rasmussen Committed by Tim-Philipp Müller

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.

parent b323fba9
......@@ -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
caps = gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (bsrc));
return caps;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment