unref camerabin when we get destroyed
authorMohammed Sameer <msameer@foolab.org>
Thu, 27 Sep 2012 22:31:44 +0000 (01:31 +0300)
committerMohammed Sameer <msameer@foolab.org>
Thu, 27 Sep 2012 22:31:44 +0000 (01:31 +0300)
lib/qtcamdevice.cpp

index 4e4850f..793eefa 100644 (file)
@@ -94,6 +94,11 @@ QtCamDevice::~QtCamDevice() {
 
   delete d_ptr->image; d_ptr->image = 0;
   delete d_ptr->video; d_ptr->video = 0;
+
+  if (d_ptr->cameraBin) {
+    gst_object_unref(d_ptr->cameraBin);
+  }
+
   delete d_ptr; d_ptr = 0;
 }