Allow full range IPv4 support, up to 255.255.255.255
authorLow Chin Kian <kenlck1990@gmail.com>
Mon, 11 Aug 2014 13:08:37 +0000 (21:08 +0800)
committerLow Chin Kian <kenlck1990@gmail.com>
Mon, 11 Aug 2014 13:08:37 +0000 (21:08 +0800)
Signed-off-by: Low Chin Kian <kenlck1990@gmail.com>
modules/videoio/src/cap_pvapi.cpp

index 4b27ab1..b889e64 100644 (file)
@@ -375,7 +375,7 @@ bool CvCaptureCAM_PvAPI::setProperty( int property_id, double value )
         }
         else
         {
-            cv::String ip=cv::format("%d.%d.%d.%d", ((int)value>>24)&255, ((int)value>>16)&255, ((int)value>>8)&255, (int)value&255);
+            cv::String ip=cv::format("%d.%d.%d.%d", ((unsigned int)value>>24)&255, ((unsigned int)value>>16)&255, ((unsigned int)value>>8)&255, (unsigned int)value&255);
             if ((PvAttrEnumSet(Camera.Handle,"MulticastEnable", "On")==ePvErrSuccess) &&
                 (PvAttrStringSet(Camera.Handle, "MulticastIPAddress", ip.c_str())==ePvErrSuccess))
                 break;