From 2a0f311f5a93a95966668fab9beb319da627714e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergi=20Hern=C3=A0ndez=20Juan?= <shernand@iri.upc.edu>
Date: Mon, 15 Jun 2015 06:46:55 +0000
Subject: [PATCH] Added additional configuration for the ladybug camera in the
 constructor (explicitly disable the JPEG compression). Initialized the
 pointer to a frame in the firewirecemra driver.

---
 src/firewirecamera.cpp |  2 +-
 src/ladybug.cpp        | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/firewirecamera.cpp b/src/firewirecamera.cpp
index 92ce4f4..a399a1c 100644
--- a/src/firewirecamera.cpp
+++ b/src/firewirecamera.cpp
@@ -1806,7 +1806,7 @@ CFirewireCamera::~CFirewireCamera()
 void *CFirewireCamera::continuous_mode(void *param)
 {
   CFirewireCamera *camera=(CFirewireCamera *)param;
-  dc1394video_frame_t *frame;
+  dc1394video_frame_t *frame=NULL;
   dc1394error_t error;
   int depth;
 
diff --git a/src/ladybug.cpp b/src/ladybug.cpp
index 7364aaf..439d27c 100755
--- a/src/ladybug.cpp
+++ b/src/ladybug.cpp
@@ -23,7 +23,15 @@ CLadyBug::CLadyBug(dc1394_t *firewire,uint64_t camera_id):CPTGCamera(firewire,ca
   this->multi_coding=RGB;
   this->multi_width=1024;
   this->multi_height=768;
-  error=dc1394_set_control_register(this->camera_handle,0x1E88,0xFFFFFF);
+  /* enable all cameras */
+  error=dc1394_set_control_register(this->camera_handle,0x1E88,0xFFFFFFFF);
+  if(error!=DC1394_SUCCESS)
+  {
+    /* handle exceptions */
+    throw CFirewireInternalException(_HERE_,error);
+  }
+  /* disabel JPEG compression */
+  error=dc1394_set_control_register(this->camera_handle,0x1E80,0x00000000);
   if(error!=DC1394_SUCCESS)
   {
     /* handle exceptions */
-- 
GitLab