projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e18427b
)
add protection against EAGAIN error in the streams (thanks to vrabaud for the patch...
author
Vadim Pisarevsky
<no@email>
Mon, 22 Nov 2010 13:07:43 +0000
(13:07 +0000)
committer
Vadim Pisarevsky
<no@email>
Mon, 22 Nov 2010 13:07:43 +0000
(13:07 +0000)
modules/highgui/src/cap_ffmpeg.cpp
patch
|
blob
|
history
diff --git
a/modules/highgui/src/cap_ffmpeg.cpp
b/modules/highgui/src/cap_ffmpeg.cpp
index
def8eb5
..
ee59ae1
100644
(file)
--- a/
modules/highgui/src/cap_ffmpeg.cpp
+++ b/
modules/highgui/src/cap_ffmpeg.cpp
@@
-538,7
+538,13
@@
bool CvCapture_FFMPEG::grabFrame()
}
// get the next frame
- while (!valid && (av_read_frame(ic, &packet) >= 0)) {
+ while (!valid) {
+ int ret = av_read_frame(ic, &packet);
+ if (ret == AVERROR(EAGAIN))
+ continue;
+ if (ret < 0)
+ break;
+
if( packet.stream_index != video_stream ) {
av_free_packet (&packet);
continue;