Commit ddba7722 authored by Alexander Alekhin's avatar Alexander Alekhin

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

parent 133e9f20
...@@ -169,7 +169,7 @@ bool VideoCapture::isOpened() const ...@@ -169,7 +169,7 @@ bool VideoCapture::isOpened() const
{ {
if (!icap.empty()) if (!icap.empty())
return icap->isOpened(); 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() void VideoCapture::release()
......
...@@ -288,7 +288,7 @@ namespace videoio_registry { ...@@ -288,7 +288,7 @@ namespace videoio_registry {
std::vector<VideoBackendInfo> getAvailableBackends_CaptureByIndex() 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; return result;
} }
std::vector<VideoBackendInfo> getAvailableBackends_CaptureByFilename() std::vector<VideoBackendInfo> getAvailableBackends_CaptureByFilename()
......
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