From 8f334b4e41e12457fd1d6c720783b5a85cbb15e7 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 25 Sep 2014 11:51:31 +0200 Subject: [PATCH] Fixed assertion warning in MSMF frame grabber Applied in PR3251 to 2.4 branch --- modules/videoio/src/cap_msmf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/videoio/src/cap_msmf.cpp b/modules/videoio/src/cap_msmf.cpp index a18417fb6..a92e8d7b5 100644 --- a/modules/videoio/src/cap_msmf.cpp +++ b/modules/videoio/src/cap_msmf.cpp @@ -1471,7 +1471,6 @@ void ImageGrabber::stopGrabbing() HRESULT ImageGrabber::startGrabbing(void) { - _ComPtr pEvent = NULL; PROPVARIANT var; PropVariantInit(&var); HRESULT hr = ig_pSession->SetTopology(0, ig_pTopology); @@ -1479,6 +1478,7 @@ HRESULT ImageGrabber::startGrabbing(void) hr = ig_pSession->Start(&GUID_NULL, &var); for(;;) { + _ComPtr pEvent = NULL; HRESULT hrStatus = S_OK; MediaEventType met; if(!ig_pSession) break;