samples: use findFile() in "cpp"
This commit is contained in:
committed by
Alexander Alekhin
parent
2fa9bd221d
commit
c4c31f5bba
@@ -38,7 +38,10 @@ int main(int argc, const char** argv)
|
||||
if (file.empty())
|
||||
cap.open(camera);
|
||||
else
|
||||
{
|
||||
file = samples::findFileOrKeep(file); // ignore gstreamer pipelines
|
||||
cap.open(file.c_str());
|
||||
}
|
||||
if (!cap.isOpened())
|
||||
{
|
||||
cout << "Can not open video stream: '" << (file.empty() ? "<camera>" : file) << "'" << endl;
|
||||
|
||||
Reference in New Issue
Block a user