From daf3f4cb1a6c5cce20921e58d09bcf866e2a7a9a Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 31 Dec 2020 12:34:37 -0800 Subject: [PATCH] [cscore] cscore_raw_cv.h: Fix error in PutFrame() (#3019) --- cscore/src/main/native/include/cscore_raw_cv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cscore/src/main/native/include/cscore_raw_cv.h b/cscore/src/main/native/include/cscore_raw_cv.h index 18690327a1..5a2b727e05 100644 --- a/cscore/src/main/native/include/cscore_raw_cv.h +++ b/cscore/src/main/native/include/cscore_raw_cv.h @@ -159,8 +159,8 @@ inline void RawCvSource::PutFrame(cv::Mat& image) { rawFrame.data = reinterpret_cast(image.data); rawFrame.width = image.cols; rawFrame.height = image.rows; - rawFrame.totalData = image.total() * image.channels; - rawFrame.pixelFormat = image.channels == 3 ? CS_PIXFMT_BGR : CS_PIXFMT_GRAY; + rawFrame.totalData = image.total() * image.channels(); + rawFrame.pixelFormat = image.channels() == 3 ? CS_PIXFMT_BGR : CS_PIXFMT_GRAY; PutSourceFrame(m_handle, rawFrame, &m_status); }