Skip to content

Commit 6938772

Browse files
committed
Fixed video writer filename check for plugins
1 parent d7744ac commit 6938772

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/videoio/src/backend_plugin.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ class PluginWriter : public cv::IVideoWriter
480480
if (plugin_api->Writer_open)
481481
{
482482
CV_Assert(plugin_api->Writer_release);
483-
if (CV_ERROR_OK == plugin_api->Writer_open(filename.empty() ? 0 : filename.c_str(), fourcc, fps, sz.width, sz.height, isColor, &writer))
483+
CV_Assert(!filename.empty());
484+
if (CV_ERROR_OK == plugin_api->Writer_open(filename.c_str(), fourcc, fps, sz.width, sz.height, isColor, &writer))
484485
{
485486
CV_Assert(writer);
486487
return makePtr<PluginWriter>(plugin_api, writer);

0 commit comments

Comments
 (0)