mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 03:33:28 +08:00
Merge pull request #11555 from alalek:fix_videocapture_frame_lifetime
This commit is contained in:
commit
86e1f63193
@ -223,7 +223,7 @@ public:
|
|||||||
if (!ffmpegCapture ||
|
if (!ffmpegCapture ||
|
||||||
!icvRetrieveFrame_FFMPEG_p(ffmpegCapture, &data, &step, &width, &height, &cn))
|
!icvRetrieveFrame_FFMPEG_p(ffmpegCapture, &data, &step, &width, &height, &cn))
|
||||||
return false;
|
return false;
|
||||||
frame.assign(cv::Mat(height, width, CV_MAKETYPE(CV_8U, cn), data, step));
|
cv::Mat(height, width, CV_MAKETYPE(CV_8U, cn), data, step).copyTo(frame);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual bool open( const cv::String& filename )
|
virtual bool open( const cv::String& filename )
|
||||||
|
Loading…
Reference in New Issue
Block a user