diff --git a/modules/v4d/src/detail/clvacontext.cpp b/modules/v4d/src/detail/clvacontext.cpp index 08022a401..891c00bc5 100644 --- a/modules/v4d/src/detail/clvacontext.cpp +++ b/modules/v4d/src/detail/clvacontext.cpp @@ -64,7 +64,7 @@ void CLVAContext::write(std::function fn, const cv::UMat& #ifndef __EMSCRIPTEN__ CLExecScope_t scope(context_); #endif - fn(videoFrame_); + fn(videoFrame_.clone()); } } diff --git a/modules/v4d/src/detail/framebuffercontext.cpp b/modules/v4d/src/detail/framebuffercontext.cpp index aedaaede8..2e006f814 100644 --- a/modules/v4d/src/detail/framebuffercontext.cpp +++ b/modules/v4d/src/detail/framebuffercontext.cpp @@ -60,11 +60,7 @@ FrameBufferContext::FrameBufferContext(const cv::Size& frameBufferSize, bool off glfwWindowHint(GLFW_ALPHA_BITS, 8); glfwWindowHint(GLFW_STENCIL_BITS, 8); glfwWindowHint(GLFW_DEPTH_BITS, 24); -#ifndef __EMSCRIPTEN__ - glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); -#else glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); -#endif glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); // glfwWindowHint(GLFW_DOUBLEBUFFER, GL_FALSE); diff --git a/modules/v4d/src/v4d.cpp b/modules/v4d/src/v4d.cpp index 7ed534652..cf10a4e9f 100644 --- a/modules/v4d/src/v4d.cpp +++ b/modules/v4d/src/v4d.cpp @@ -358,7 +358,7 @@ bool V4D::capture(std::function fn) { } } - currentReaderFrame_ = nextReaderFrame_; + currentReaderFrame_ = nextReaderFrame_.clone(); fb([=,this](cv::UMat frameBuffer) { currentReaderFrame_.copyTo(frameBuffer); });