From 6cd1c73efeea7dd8ceb36ad7f1812198984f8b33 Mon Sep 17 00:00:00 2001 From: Thad House Date: Sat, 27 Apr 2019 20:16:52 -0700 Subject: [PATCH] Fix GUID comparison creating weird symbol (#1659) --- cscore/build.gradle | 4 ++-- cscore/src/main/native/windows/UsbCameraImpl.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cscore/build.gradle b/cscore/build.gradle index 3162c8804b..40cb97dafa 100644 --- a/cscore/build.gradle +++ b/cscore/build.gradle @@ -98,11 +98,11 @@ model { x86ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure', '_CT??_R0?AVbad_cast', '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', - '_TI5?AVfailure', '=='] + '_TI5?AVfailure'] x64ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure', '_CT??_R0?AVbad_cast', '_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure', - '_TI5?AVfailure', '=='] + '_TI5?AVfailure'] } cscoreJNI(ExportsConfig) { x86SymbolFilter = { symbols -> diff --git a/cscore/src/main/native/windows/UsbCameraImpl.cpp b/cscore/src/main/native/windows/UsbCameraImpl.cpp index e45f361d4f..3a6446554f 100644 --- a/cscore/src/main/native/windows/UsbCameraImpl.cpp +++ b/cscore/src/main/native/windows/UsbCameraImpl.cpp @@ -413,16 +413,16 @@ LRESULT UsbCameraImpl::PumpMain(HWND hwnd, UINT uiMsg, WPARAM wParam, static cs::VideoMode::PixelFormat GetFromGUID(const GUID& guid) { // Compare GUID to one of the supported ones - if (guid == MFVideoFormat_NV12) { + if (IsEqualGUID(guid, MFVideoFormat_NV12)) { // GrayScale return cs::VideoMode::PixelFormat::kGray; - } else if (guid == MFVideoFormat_YUY2) { + } else if (IsEqualGUID(guid, MFVideoFormat_YUY2)) { return cs::VideoMode::PixelFormat::kYUYV; - } else if (guid == MFVideoFormat_RGB24) { + } else if (IsEqualGUID(guid, MFVideoFormat_RGB24)) { return cs::VideoMode::PixelFormat::kBGR; - } else if (guid == MFVideoFormat_MJPG) { + } else if (IsEqualGUID(guid, MFVideoFormat_MJPG)) { return cs::VideoMode::PixelFormat::kMJPEG; - } else if (guid == MFVideoFormat_RGB565) { + } else if (IsEqualGUID(guid, MFVideoFormat_RGB565)) { return cs::VideoMode::PixelFormat::kRGB565; } else { return cs::VideoMode::PixelFormat::kUnknown;