提交 3ed243ab 编写于 作者: A Alexander Alekhin

Merge pull request #17430 from alalek:issue_17257

......@@ -1215,9 +1215,20 @@ bool CvCapture_FFMPEG::grabFrame()
#endif
int ret = av_read_frame(ic, &packet);
if (ret == AVERROR(EAGAIN)) continue;
/* else if (ret < 0) break; */
if (ret == AVERROR(EAGAIN))
continue;
if (ret == AVERROR_EOF)
{
if (rawMode)
break;
// flush cached frames from video decoder
packet.data = NULL;
packet.size = 0;
packet.stream_index = video_stream;
}
if( packet.stream_index != video_stream )
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册