From 2bf9080ca91b5e19b6f8d53c33e47be8d78010d4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 14 Jul 2014 14:07:28 -0400 Subject: [PATCH] ensure captures_per_frame >0 add missing lang entries for MultiBuffer and CapturesPerFrame --- src/zm_local_camera.cpp | 4 ++++ web/lang/en_gb.php | 2 ++ web/skins/classic/views/monitor.php | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/zm_local_camera.cpp b/src/zm_local_camera.cpp index 4cc041893..aa381434e 100644 --- a/src/zm_local_camera.cpp +++ b/src/zm_local_camera.cpp @@ -1980,6 +1980,10 @@ int LocalCamera::Capture( Image &image ) int captures_per_frame = 1; if ( channel_count > 1 ) captures_per_frame = v4l_captures_per_frame; + if ( captures_per_frame <= 0 ) { + captures_per_frame = 1; + Warning( "Invalid Captures Per Frame setting: %d", captures_per_frame ); + } // Do the capture, unless we are the second or subsequent camera on a channel, in which case just reuse the buffer if ( channel_prime ) diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index d0f0395a7..246a62b1a 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -710,6 +710,8 @@ $SLANG = array( 'ViewEvent' => 'View Event', 'ViewPaged' => 'View Paged', 'View' => 'View', + 'V4LCapturesPerFrame' => 'Captures Per Frame', + 'V4LMultiBuffer' => 'Multi Buffering', 'Wake' => 'Wake', 'WarmupFrames' => 'Warmup Frames', 'Watch' => 'Watch', diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index ccb5023c1..ca277d19d 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -740,7 +740,7 @@ switch ( $tab ) } ?> /> - +