Skip to content

Commit 2dc1572

Browse files
committed
Merge pull request opencv#19669 from alalek:fix_static_analyzer_issues_4.x
2 parents d2ac304 + 16c3522 commit 2dc1572

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

modules/gapi/src/backends/ie/giebackend.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,7 @@ struct InferList: public cv::detail::KernelTag {
936936
std::vector<cv::Mat> &out_vec = ctx->outVecR<cv::Mat>(i);
937937

938938
IE::Blob::Ptr out_blob = req.GetBlob(ctx->uu.params.output_names[i]);
939+
GAPI_Assert(out_blob);
939940

940941
cv::Mat out_mat(cached_dims[i], toCV(out_blob->getTensorDesc().getPrecision()));
941942
// FIXME: Avoid data copy. Not sure if it is possible though
@@ -1103,6 +1104,7 @@ struct InferList2: public cv::detail::KernelTag {
11031104
std::vector<cv::Mat> &out_vec = ctx->outVecR<cv::Mat>(i);
11041105

11051106
IE::Blob::Ptr out_blob = req.GetBlob(ctx->uu.params.output_names[i]);
1107+
GAPI_Assert(out_blob);
11061108

11071109
cv::Mat out_mat(cached_dims[i], toCV(out_blob->getTensorDesc().getPrecision()));
11081110
// FIXME: Avoid data copy. Not sure if it is possible though

modules/videoio/src/cap_msmf.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,17 +615,17 @@ class CvCapture_MSMF : public cv::IVideoCapture
615615
_ComPtr<IMFDXGIDeviceManager> D3DMgr;
616616
#endif
617617
_ComPtr<IMFSourceReader> videoFileSource;
618+
_ComPtr<IMFSample> videoSample;
619+
_ComPtr<IMFSourceReaderCallback> readCallback; // non-NULL for "live" streams (camera capture)
618620
DWORD dwStreamIndex;
619621
MediaType nativeFormat;
620622
MediaType captureFormat;
621623
int outputFormat;
622624
bool convertFormat;
623625
MFTIME duration;
624626
LONGLONG frameStep;
625-
_ComPtr<IMFSample> videoSample;
626627
LONGLONG sampleTime;
627628
bool isOpen;
628-
_ComPtr<IMFSourceReaderCallback> readCallback; // non-NULL for "live" streams (camera capture)
629629
};
630630

631631
CvCapture_MSMF::CvCapture_MSMF():
@@ -641,8 +641,12 @@ CvCapture_MSMF::CvCapture_MSMF():
641641
#endif
642642
videoFileSource(NULL),
643643
videoSample(NULL),
644+
readCallback(NULL),
645+
dwStreamIndex(0),
644646
outputFormat(CV_CAP_MODE_BGR),
645647
convertFormat(true),
648+
duration(0),
649+
frameStep(0),
646650
sampleTime(0),
647651
isOpen(false)
648652
{

0 commit comments

Comments
 (0)