diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 4fe59b5e8..e9998c181 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -306,8 +306,8 @@ Monitor::Monitor( server_id( p_server_id ), function( (Function)p_function ), enabled( p_enabled ), - width( p_camera->Width() ), - height( p_camera->Height() ), + width( (p_orientation==ROTATE_90||p_orientation==ROTATE_270)?p_camera->Height():p_camera->Width() ), + height( (p_orientation==ROTATE_90||p_orientation==ROTATE_270)?p_camera->Width():p_camera->Height() ), orientation( (Orientation)p_orientation ), deinterlacing( p_deinterlacing ), label_coord( p_label_coord ), diff --git a/src/zm_monitor.h b/src/zm_monitor.h index d1a619a4c..a9cd05674 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -358,8 +358,8 @@ public: return( embed_exif ); } - unsigned int Width() const { return( (p_orientation==ROTATE_90||p_orientation==ROTATE_270)?p_camera->Height():p_camera->Width() ); } - unsigned int Height() const { return( (p_orientation==ROTATE_90||p_orientation==ROTATE_270)?p_camera->Width():p_camera->Height() ); } + unsigned int Width() const { return( width ); } + unsigned int Height() const { return( height ); } unsigned int Colours() const { return( camera->Colours() ); } unsigned int SubpixelOrder() const { return( camera->SubpixelOrder() ); }