[cheese] Killed a memory leak



commit 8a5843cfc0d716e0f31c98fad4370b362a4e1a23
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date:   Sat Aug 7 16:30:02 2010 +0530

    Killed a memory leak

 libcheese/cheese-camera.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index afe1a90..fc69d37 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -742,9 +742,9 @@ cheese_camera_change_effect_filter (CheeseCamera *camera, GstElement *new_filter
   gst_element_unlink_many (priv->main_valve, priv->effect_filter,
                            priv->csp_post_effect, NULL);
 
-  g_object_ref(priv->effect_filter);
+  g_object_ref(priv->effect_filter); 
   gst_bin_remove (GST_BIN (priv->video_display_bin), priv->effect_filter);
-  priv->effect_filter = NULL;
+  gst_element_set_state (priv->effect_filter, GST_STATE_NULL);
   g_object_unref(priv->effect_filter);
 
   gst_bin_add (GST_BIN (priv->video_display_bin), new_filter);



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