Commit 7cb627a3 authored by cudawarped's avatar cudawarped

Patch cv::cudacodec::createVideoReader() memory leak until cudacodec can be…

Patch cv::cudacodec::createVideoReader() memory leak until cudacodec can be updated to miirror NVidia example code.
parent 7011e1b1
......@@ -62,7 +62,7 @@ cv::cudacodec::detail::CuvidVideoSource::CuvidVideoSource(const String& fname)
// now create the actual source
CUresult cuRes = cuvidCreateVideoSource(&videoSource_, fname.c_str(), &params);
if (cuRes == CUDA_ERROR_INVALID_SOURCE)
throw std::runtime_error("");
CV_Error(Error::StsUnsupportedFormat, "Unsupported video source");
cuSafeCall( cuRes );
CUVIDEOFORMAT vidfmt;
......
......@@ -118,6 +118,7 @@ int CUDAAPI cv::cudacodec::detail::VideoParser::HandleVideoSequence(void* userDa
try
{
thiz->videoDecoder_->release();
thiz->videoDecoder_->create(newFormat);
}
catch (const cv::Exception&)
......
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