[cheese/camerabin2: 21/23] cheese-camera: Fix leak inserted at the last commit



commit ff25f74dd3329fa03f08b5454d8c6f1224643511
Author: Thiago Santos <thiago sousa santos collabora com>
Date:   Mon Apr 30 09:47:45 2012 -0300

    cheese-camera: Fix leak inserted at the last commit
    
    Do not forget to unref the element after getting it from camerabin

 libcheese/cheese-camera.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 4a888bf..714a1d5 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -1779,8 +1779,10 @@ cheese_camera_get_recorded_time (CheeseCamera *camera)
   gboolean ret = FALSE;
 
   videosink = gst_bin_get_by_name (priv->camerabin, "videobin-filesink");
-  if (videosink)
+  if (videosink) {
     ret = gst_element_query_position (videosink, &format, &curtime);
+    gst_object_unref (videosink);
+  }
   if (ret) {
 
     // Substract seconds, minutes and hours.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]