Accelerating the completion of video bypass (bug #1893)

pull/2/head
Alexander Reshetnikov 13 years ago
parent 3ec43a11ed
commit 57e26bde9f
  1. 3
      modules/highgui/src/cap.cpp

@ -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…
Cancel
Save