提交 636cb15f 编写于 作者: V Vadim Pisarevsky

add protection against EAGAIN error in the streams (thanks to vrabaud for the patch - ticket #553)

上级 e18427b1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册