From 2577194c7025c4536766fa9176f9b4b98e3b948b Mon Sep 17 00:00:00 2001 From: Adam Rankin Date: Tue, 7 Jun 2016 15:14:27 -0400 Subject: [PATCH] Correcting return type from videoDevice::findType to be int thus allowing detection of failed device init request --- 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 745642f294..c10a7c045e 100644 --- a/modules/videoio/src/cap_msmf.cpp +++ b/modules/videoio/src/cap_msmf.cpp @@ -2580,7 +2580,7 @@ bool videoDevice::setupDevice(unsigned int id) bool videoDevice::setupDevice(unsigned int w, unsigned int h, unsigned int idealFramerate) { - unsigned int id = findType(w * h, idealFramerate); + int id = findType(w * h, idealFramerate); if( id < 0 ) return false;