diff --git a/modules/videoio/src/cap.cpp b/modules/videoio/src/cap.cpp index 693f32e6f2..c1ee87a15a 100644 --- a/modules/videoio/src/cap.cpp +++ b/modules/videoio/src/cap.cpp @@ -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() diff --git a/modules/videoio/src/videoio_registry.cpp b/modules/videoio/src/videoio_registry.cpp index 484ebe30bc..c994c71a48 100644 --- a/modules/videoio/src/videoio_registry.cpp +++ b/modules/videoio/src/videoio_registry.cpp @@ -288,7 +288,7 @@ namespace videoio_registry { std::vector getAvailableBackends_CaptureByIndex() { - const std::vector result = VideoBackendRegistry::getInstance().getAvailableBackends_CaptureByFilename(); + const std::vector result = VideoBackendRegistry::getInstance().getAvailableBackends_CaptureByIndex(); return result; } std::vector getAvailableBackends_CaptureByFilename()