Merge pull request #26652 from mshabunin:fix-ffmpeg-plugin

videoio: fixed writer setProperty with FFmpeg plugin
This commit is contained in:
Alexander Smorkalov 2024-12-20 08:31:13 +03:00 committed by GitHub
commit 8ffc4a6bd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -515,8 +515,19 @@ CvResult CV_API_CALL cv_writer_get_prop(CvPluginWriter handle, int prop, CV_OUT
} }
static static
CvResult CV_API_CALL cv_writer_set_prop(CvPluginWriter /*handle*/, int /*prop*/, double /*val*/) CvResult CV_API_CALL cv_writer_set_prop(CvPluginWriter handle, int prop, double val)
{ {
if (!handle)
return CV_ERROR_FAIL;
try
{
CvVideoWriter_FFMPEG_proxy* instance = (CvVideoWriter_FFMPEG_proxy*)handle;
return (instance->setProperty(prop, val) ? CV_ERROR_OK : CV_ERROR_FAIL);
}
catch (...)
{
return CV_ERROR_FAIL;
}
return CV_ERROR_FAIL; return CV_ERROR_FAIL;
} }