From 2a9521661ed92de44f6206486d45dd91e5e43710 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Tue, 9 Jul 2019 14:08:29 +0300 Subject: [PATCH] Fixed video writer filename check for plugins --- modules/videoio/src/backend_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/videoio/src/backend_plugin.cpp b/modules/videoio/src/backend_plugin.cpp index 17f7a1de4e..71f79c16db 100644 --- a/modules/videoio/src/backend_plugin.cpp +++ b/modules/videoio/src/backend_plugin.cpp @@ -480,7 +480,8 @@ public: if (plugin_api->Writer_open) { CV_Assert(plugin_api->Writer_release); - if (CV_ERROR_OK == plugin_api->Writer_open(filename.empty() ? 0 : filename.c_str(), fourcc, fps, sz.width, sz.height, isColor, &writer)) + CV_Assert(!filename.empty()); + if (CV_ERROR_OK == plugin_api->Writer_open(filename.c_str(), fourcc, fps, sz.width, sz.height, isColor, &writer)) { CV_Assert(writer); return makePtr(plugin_api, writer);