Commit 1af45212 authored by hahne's avatar hahne

fix for issue 1915

parent 361eb633
......@@ -649,13 +649,13 @@ bool CvCapture_FFMPEG::grabFrame()
frame_number > ic->streams[video_stream]->nb_frames )
return false;
av_free_packet (&packet);
picture_pts = AV_NOPTS_VALUE_;
// get the next frame
while (!valid)
{
av_free_packet (&packet);
int ret = av_read_frame(ic, &packet);
if (ret == AVERROR(EAGAIN)) continue;
......@@ -698,8 +698,6 @@ bool CvCapture_FFMPEG::grabFrame()
if (count_errs > max_number_of_attempts)
break;
}
av_free_packet (&packet);
}
if( valid && first_frame_number < 0 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment