From 302189a65e74a93bb11c9fac549395f30032ce91 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 6 Aug 2020 10:11:00 -0400 Subject: [PATCH] Don't use camera->LineSize when allocating shared images. It doesn't work because other processes don't know about it. --- src/zm_monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 585d2371d..7115ff6a9 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -636,7 +636,7 @@ bool Monitor::connect() { image_buffer = new Snapshot[image_buffer_count]; for ( int i = 0; i < image_buffer_count; i++ ) { image_buffer[i].timestamp = &(shared_timestamps[i]); - image_buffer[i].image = new Image( width, camera->LineSize(), height, camera->Colours(), camera->SubpixelOrder(), &(shared_images[i*camera->ImageSize()]) ); + image_buffer[i].image = new Image( width, height, camera->Colours(), camera->SubpixelOrder(), &(shared_images[i*camera->ImageSize()]) ); image_buffer[i].image->HoldBuffer(true); /* Don't release the internal buffer or replace it with another */ } if ( (deinterlacing & 0xff) == 4) {