summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--video-ps3eye/module.cpp3
-rw-r--r--video-ps3eye/module.hpp1
-rw-r--r--video-ps3eye/wrapper.cxx1
3 files changed, 3 insertions, 2 deletions
diff --git a/video-ps3eye/module.cpp b/video-ps3eye/module.cpp
index 2c9ce100..3ee43ec1 100644
--- a/video-ps3eye/module.cpp
+++ b/video-ps3eye/module.cpp
@@ -203,7 +203,8 @@ fail:
static_assert(offsetof(decltype(ptr.out), data_640x480) == offsetof(decltype(ptr.out), data_320x240));
ok:
- fr.data = (unsigned char*)ptr.out.data_640x480;
+ memcpy(data, (unsigned char*)ptr.out.data_640x480,sizeof(ptr.out.data_640x480));
+ fr.data = data;
return { fr, true};
}
diff --git a/video-ps3eye/module.hpp b/video-ps3eye/module.hpp
index 6e0addfc..957e221e 100644
--- a/video-ps3eye/module.hpp
+++ b/video-ps3eye/module.hpp
@@ -28,6 +28,7 @@ struct ps3eye_camera final : video::impl::camera
shm_wrapper shm { "ps3eye-driver-shm", nullptr, sizeof(ps3eye::shm) };
settings s;
frame fr;
+ unsigned char data[640 * 480 * 3] = {};
int framerate = 30;
bool open = false;
unsigned timecode = 0;
diff --git a/video-ps3eye/wrapper.cxx b/video-ps3eye/wrapper.cxx
index 291f3e8f..eca8968d 100644
--- a/video-ps3eye/wrapper.cxx
+++ b/video-ps3eye/wrapper.cxx
@@ -26,7 +26,6 @@ static void error(volatile ps3eye::shm_out& out, const char (&error)[N], const x
static void update_settings(ps3eye::camera& camera, const volatile ps3eye::shm_in& in)
{
- // TODO
//camera.set_framerate(in.framerate);
camera.set_auto_gain(in.auto_gain);
camera.set_gain(in.gain);