projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ec43a1
)
Accelerating the completion of video bypass (bug #1893)
author
Alexander Reshetnikov
<no@email>
Sat, 5 May 2012 17:28:05 +0000
(17:28 +0000)
committer
Alexander Reshetnikov
<no@email>
Sat, 5 May 2012 17:28:05 +0000
(17:28 +0000)
modules/highgui/src/cap.cpp
patch
|
blob
|
history
diff --git
a/modules/highgui/src/cap.cpp
b/modules/highgui/src/cap.cpp
index
d863431
..
45ef082
100644
(file)
--- a/
modules/highgui/src/cap.cpp
+++ b/
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();
}