summaryrefslogtreecommitdiffhomepage
path: root/video-ps3eye/wrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'video-ps3eye/wrapper.cxx')
-rw-r--r--video-ps3eye/wrapper.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/video-ps3eye/wrapper.cxx b/video-ps3eye/wrapper.cxx
index 0f9344eb..b7f58185 100644
--- a/video-ps3eye/wrapper.cxx
+++ b/video-ps3eye/wrapper.cxx
@@ -52,6 +52,7 @@ int main(int argc, char** argv)
volatile auto& ptr_ = *(ps3eye::shm*)mem_.ptr();
volatile auto& in = ptr_.in;
volatile auto& out = ptr_.out;
+ int num_channels = in.channels;
auto cameras = ps3eye::list_devices();
@@ -65,9 +66,7 @@ int main(int argc, char** argv)
auto* frame = (uint8_t*)out.data_640x480;
decltype(out.timecode) timecode = 0;
- constexpr auto fmt = ps3eye::num_channels == 1
- ? ps3eye::format::Gray
- : ps3eye::format::BGR;
+ auto fmt = num_channels == 1 ? ps3eye::format::Gray : ps3eye::format::BGR;
{
int framerate = in.framerate;