From 5a5fca2689dcbda063f49235cfa8a2346a014e71 Mon Sep 17 00:00:00 2001 From: Lasse Laukkanen Date: Tue, 2 Nov 2010 09:38:20 -0300 Subject: [PATCH] camerabin: Do not leak a caps gst_caps_replace doesn't take ownership, but refs the caps. So we unref the remaining caps. --- gst/camerabin/gstcamerabin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 0753167914..23b314a8b7 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -4054,6 +4054,8 @@ gst_camerabin_set_image_capture_caps (GstCameraBin * camera, gint width, "init filter caps for image capture %" GST_PTR_FORMAT, new_caps); gst_caps_replace (&camera->image_capture_caps, new_caps); camera->image_capture_caps_update = FALSE; + if (new_caps) + gst_caps_unref (new_caps); } static void