Commit d067749c authored by WonderRico's avatar WonderRico

fix _index / index

parent a0483873
...@@ -3170,7 +3170,7 @@ bool CvCaptureCAM_DShow::open( int _index ) ...@@ -3170,7 +3170,7 @@ bool CvCaptureCAM_DShow::open( int _index )
devices = VI.listDevices(true); devices = VI.listDevices(true);
if (devices == 0) if (devices == 0)
return false; return false;
if (_index < 0 || index > devices-1) if (_index < 0 || _index > devices-1)
return false; return false;
VI.setupDevice(_index); VI.setupDevice(_index);
if( !VI.isDeviceSetup(_index) ) if( !VI.isDeviceSetup(_index) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment