summaryrefslogtreecommitdiffstats
path: root/plugins/pylon/uca-pylon-camera.c
diff options
context:
space:
mode:
authorMihael Koep <koep@schneide.com>2014-04-09 14:58:01 +0200
committerMihael Koep <koep@schneide.com>2014-04-09 14:58:01 +0200
commit10c2e35112d43c06fc715014b33094761f01c992 (patch)
treee02cd3ec095f606f85eb0fff71ab5b1eed19f50e /plugins/pylon/uca-pylon-camera.c
parent0e4338b82c6995f4b8647ec668a752b69085c052 (diff)
downloadlibuca-10c2e35112d43c06fc715014b33094761f01c992.tar.gz
libuca-10c2e35112d43c06fc715014b33094761f01c992.tar.bz2
libuca-10c2e35112d43c06fc715014b33094761f01c992.tar.xz
libuca-10c2e35112d43c06fc715014b33094761f01c992.zip
Remove unnecessary allocation
We now require libpyloncam 0.3.0 or better and got rid of a unnecessary memory check and allocation
Diffstat (limited to 'plugins/pylon/uca-pylon-camera.c')
-rw-r--r--plugins/pylon/uca-pylon-camera.c6
1 files changed, 1 insertions, 5 deletions
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;
}