add protection against EAGAIN error in the streams (thanks to vrabaud for the patch - ticket #553)
This commit is contained in:
parent
e18427b139
commit
636cb15f3d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user