mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
Accelerating the completion of video bypass (bug #1893)
This commit is contained in:
parent
3ec43a11ed
commit
57e26bde9f
@ -494,10 +494,13 @@ bool VideoCapture::retrieve(Mat& image, int channel)
|
||||
|
||||
bool VideoCapture::read(Mat& image)
|
||||
{
|
||||
if (get(CV_CAP_PROP_POS_FRAMES) < get(CV_CAP_PROP_FRAME_COUNT))
|
||||
if(!grab())
|
||||
image.release();
|
||||
else
|
||||
retrieve(image);
|
||||
else
|
||||
image.release();
|
||||
return !image.empty();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user