From 10c2e35112d43c06fc715014b33094761f01c992 Mon Sep 17 00:00:00 2001
From: Mihael Koep <koep@schneide.com>
Date: Wed, 9 Apr 2014 14:58:01 +0200
Subject: Remove unnecessary allocation

We now require libpyloncam 0.3.0 or better and got rid of a
unnecessary memory check and allocation
---
 plugins/pylon/CMakeLists.txt     | 4 ++--
 plugins/pylon/changelog.txt      | 3 +++
 plugins/pylon/uca-pylon-camera.c | 6 +-----
 3 files changed, 6 insertions(+), 7 deletions(-)

(limited to 'plugins/pylon')

diff --git a/plugins/pylon/CMakeLists.txt b/plugins/pylon/CMakeLists.txt
index 3f8569c..5864b84 100644
--- a/plugins/pylon/CMakeLists.txt
+++ b/plugins/pylon/CMakeLists.txt
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 project(ucapylon C)
-set(VERSION "1.1.0")
+set(VERSION "1.1.1")
 
 find_package(Pylon)
 
@@ -11,7 +11,7 @@ if (PYLON_FOUND)
     set(PLUGIN_SUMMARY "Pylon plugin for libuca")
     set(PLUGIN_CHANGELOG "${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt")
     set(PLUGIN_DESCRIPTION "Plugin for the Basler GigE CCD Camera.")
-    set(PLUGIN_REQUIRES "libuca >= 1.3.0, libpyloncam >= 0.2.3")
+    set(PLUGIN_REQUIRES "libuca >= 1.3.0, libpyloncam >= 0.3.0")
     set(PLUGIN_VENDOR "ANKA Computing Group")
 
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../package-plugin.sh.in
diff --git a/plugins/pylon/changelog.txt b/plugins/pylon/changelog.txt
index 755233e..adfa95b 100644
--- a/plugins/pylon/changelog.txt
+++ b/plugins/pylon/changelog.txt
@@ -1,3 +1,6 @@
+* Wed Apr 9 2014 Mihael Koep <mihael.koep@softwareschneiderei.de> 1.1.1-1
+- remove unneeded memory allocation
+- require libpyloncam 0.3.0
 * Wed Apr 9 2014 Mihael Koep <mihael.koep@softwareschneiderei.de> 1.1.0-1
 - make compatible with current libuca
 * Tue Oct 15 2013 Mihael Koep <mihael.koep@softwareschneiderei.de> 1.0.2-2
diff --git a/plugins/pylon/uca-pylon-camera.c b/plugins/pylon/uca-pylon-camera.c
index 069d573..02d6795 100644
--- a/plugins/pylon/uca-pylon-camera.c
+++ b/plugins/pylon/uca-pylon-camera.c
@@ -126,12 +126,8 @@ static void uca_pylon_camera_stop_recording(UcaCamera *camera, GError **error)
 static gboolean uca_pylon_camera_grab(UcaCamera *camera, gpointer data, GError **error)
 {
     g_return_val_if_fail(UCA_IS_PYLON_CAMERA(camera), FALSE);
-    UcaPylonCameraPrivate *priv = UCA_PYLON_CAMERA_GET_PRIVATE(camera);
 
-    if (data == NULL) {
-        data = g_malloc0(priv->roi_width * priv->roi_height * priv->num_bytes);
-    }
-    pylon_camera_grab(&data, error);
+    pylon_camera_grab(data, error);
     return TRUE;
 }
 
-- 
cgit v1.2.3