From 19bd1e6d55109aa21562e64a288de335e2729279 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 14 Apr 2011 20:39:38 -0300 Subject: [PATCH] camerabin: Do not forget to unref the ffmpegcolorspace Do not leak the ffmpegcolorspace by unrefing it at dispose --- gst/camerabin/camerabinimage.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/camerabin/camerabinimage.c b/gst/camerabin/camerabinimage.c index 2aa858d883..620285c230 100644 --- a/gst/camerabin/camerabinimage.c +++ b/gst/camerabin/camerabinimage.c @@ -195,6 +195,12 @@ gst_camerabin_image_dispose (GstCameraBinImage * img) img->enc = NULL; } + if (img->csp) { + GST_LOG_OBJECT (img, "disposing %s with refcount %d", + GST_ELEMENT_NAME (img->enc), GST_OBJECT_REFCOUNT_VALUE (img->csp)); + gst_object_unref (img->csp); + img->csp = NULL; + } /* Note: if imagebin was never set to READY state the ownership of elements created by application were never