From 57bff43aecffc7d7fdd583042445372135de66b3 Mon Sep 17 00:00:00 2001 From: Vladimir Dudnik Date: Sat, 1 Aug 2015 02:10:05 +0300 Subject: [PATCH] fixed not initialized nv12_cpu_copy surface, remove odd code --- samples/directx/d3d11_interop.cpp | 1 + samples/directx/d3dsample.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/directx/d3d11_interop.cpp b/samples/directx/d3d11_interop.cpp index 5012886766..95cf68b4af 100644 --- a/samples/directx/d3d11_interop.cpp +++ b/samples/directx/d3d11_interop.cpp @@ -111,6 +111,7 @@ public: m_pSurfaceRGBA = 0; m_pSurfaceNV12 = 0; + m_pSurfaceNV12_cpu_copy = 0; D3D11_TEXTURE2D_DESC desc_rgba; diff --git a/samples/directx/d3dsample.hpp b/samples/directx/d3dsample.hpp index 8ab7afb2b5..4f6ac9c8a3 100644 --- a/samples/directx/d3dsample.hpp +++ b/samples/directx/d3dsample.hpp @@ -175,10 +175,10 @@ static const char* keys = template int d3d_app(int argc, char** argv, std::string& title) { - cv::CommandLineParser parser(argc, argv, keys); \ - bool useCamera = parser.has("camera"); \ - string file = parser.get("file"); \ - bool showHelp = parser.get("help"); \ + cv::CommandLineParser parser(argc, argv, keys); + bool useCamera = parser.has("camera"); + string file = parser.get("file"); + bool showHelp = parser.get("help"); if (showHelp) help();