From 16c3522f4ea1cdc8c51a37798905271597cfb3d9 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 3 Mar 2021 09:10:00 +0000 Subject: [PATCH] static analyzer issues --- modules/gapi/src/backends/ie/giebackend.cpp | 2 ++ modules/videoio/src/cap_msmf.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/gapi/src/backends/ie/giebackend.cpp b/modules/gapi/src/backends/ie/giebackend.cpp index 0a9a730571..1e573d81bb 100644 --- a/modules/gapi/src/backends/ie/giebackend.cpp +++ b/modules/gapi/src/backends/ie/giebackend.cpp @@ -936,6 +936,7 @@ struct InferList: public cv::detail::KernelTag { std::vector &out_vec = ctx->outVecR(i); IE::Blob::Ptr out_blob = req.GetBlob(ctx->uu.params.output_names[i]); + GAPI_Assert(out_blob); cv::Mat out_mat(cached_dims[i], toCV(out_blob->getTensorDesc().getPrecision())); // FIXME: Avoid data copy. Not sure if it is possible though @@ -1103,6 +1104,7 @@ struct InferList2: public cv::detail::KernelTag { std::vector &out_vec = ctx->outVecR(i); IE::Blob::Ptr out_blob = req.GetBlob(ctx->uu.params.output_names[i]); + GAPI_Assert(out_blob); cv::Mat out_mat(cached_dims[i], toCV(out_blob->getTensorDesc().getPrecision())); // FIXME: Avoid data copy. Not sure if it is possible though diff --git a/modules/videoio/src/cap_msmf.cpp b/modules/videoio/src/cap_msmf.cpp index 1cb537de8f..73288c3d03 100644 --- a/modules/videoio/src/cap_msmf.cpp +++ b/modules/videoio/src/cap_msmf.cpp @@ -615,6 +615,8 @@ protected: _ComPtr D3DMgr; #endif _ComPtr videoFileSource; + _ComPtr videoSample; + _ComPtr readCallback; // non-NULL for "live" streams (camera capture) DWORD dwStreamIndex; MediaType nativeFormat; MediaType captureFormat; @@ -622,10 +624,8 @@ protected: bool convertFormat; MFTIME duration; LONGLONG frameStep; - _ComPtr videoSample; LONGLONG sampleTime; bool isOpen; - _ComPtr readCallback; // non-NULL for "live" streams (camera capture) }; CvCapture_MSMF::CvCapture_MSMF(): @@ -641,8 +641,12 @@ CvCapture_MSMF::CvCapture_MSMF(): #endif videoFileSource(NULL), videoSample(NULL), + readCallback(NULL), + dwStreamIndex(0), outputFormat(CV_CAP_MODE_BGR), convertFormat(true), + duration(0), + frameStep(0), sampleTime(0), isOpen(false) {