[cheese/wip/hans-fixes: 6/35] cheese-camera: Fix video-source memleak when switching between cameras
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/wip/hans-fixes: 6/35] cheese-camera: Fix video-source memleak when switching between cameras
- Date: Fri, 14 Jun 2013 22:24:11 +0000 (UTC)
commit 86d571d50e89b107a552b87682ba9e0d8f644bd3
Author: Hans de Goede <hdegoede redhat com>
Date: Mon Jun 10 10:46:10 2013 +0200
cheese-camera: Fix video-source memleak when switching between cameras
Signed-off-by: Hans de Goede <hdegoede redhat com>
libcheese/cheese-camera.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index b55dc82..c6cb4eb 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -400,6 +400,9 @@ cheese_camera_set_camera_source (CheeseCamera *camera)
guint i;
CheeseCameraDevice *selected_camera;
+ if (priv->video_source)
+ gst_object_unref (priv->video_source);
+
/* If we have a matching video device use that one, otherwise use the first */
priv->selected_device = 0;
selected_camera = g_ptr_array_index (priv->camera_devices, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]