videoio: fix isOpened() method for legacy APIs, fix "index" API list

This commit is contained in:
Alexander Alekhin 2018-05-31 14:07:22 +03:00
parent 133e9f2012
commit ddba772297
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ bool VideoCapture::isOpened() const
{
if (!icap.empty())
return icap->isOpened();
return !icap.empty(); // legacy interface doesn't support closed files
return !cap.empty(); // legacy interface doesn't support closed files
}
void VideoCapture::release()

View File

@ -288,7 +288,7 @@ namespace videoio_registry {
std::vector<VideoBackendInfo> getAvailableBackends_CaptureByIndex()
{
const std::vector<VideoBackendInfo> result = VideoBackendRegistry::getInstance().getAvailableBackends_CaptureByFilename();
const std::vector<VideoBackendInfo> result = VideoBackendRegistry::getInstance().getAvailableBackends_CaptureByIndex();
return result;
}
std::vector<VideoBackendInfo> getAvailableBackends_CaptureByFilename()