From 1b56e801473c37d6b1777bb1cd7dd8322c769881 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sat, 9 Aug 2014 01:23:50 +0200 Subject: [PATCH] dfbvideosink: Unref pad template caps after usage Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734518 --- ext/directfb/dfbvideosink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/directfb/dfbvideosink.c b/ext/directfb/dfbvideosink.c index e2f8e8d..dfe49c3 100644 --- a/ext/directfb/dfbvideosink.c +++ b/ext/directfb/dfbvideosink.c @@ -1349,8 +1349,10 @@ gst_dfbvideosink_getcaps (GstBaseSink * bsink, GstCaps * filter) dfbvideosink = GST_DFBVIDEOSINK (bsink); if (!dfbvideosink->setup) { - caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD - (dfbvideosink))); + GstCaps *tcaps = + gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (dfbvideosink)); + caps = gst_caps_copy (tcaps); + gst_caps_unref (tcaps); GST_DEBUG_OBJECT (dfbvideosink, "getcaps called and we are not setup yet, " "returning template %" GST_PTR_FORMAT, caps); goto beach; -- 2.7.4