fix for issue 1915
This commit is contained in:
parent
361eb633f6
commit
1af4521239
@ -649,13 +649,13 @@ bool CvCapture_FFMPEG::grabFrame()
|
|||||||
frame_number > ic->streams[video_stream]->nb_frames )
|
frame_number > ic->streams[video_stream]->nb_frames )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
av_free_packet (&packet);
|
|
||||||
|
|
||||||
picture_pts = AV_NOPTS_VALUE_;
|
picture_pts = AV_NOPTS_VALUE_;
|
||||||
|
|
||||||
// get the next frame
|
// get the next frame
|
||||||
while (!valid)
|
while (!valid)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
av_free_packet (&packet);
|
||||||
int ret = av_read_frame(ic, &packet);
|
int ret = av_read_frame(ic, &packet);
|
||||||
if (ret == AVERROR(EAGAIN)) continue;
|
if (ret == AVERROR(EAGAIN)) continue;
|
||||||
|
|
||||||
@ -698,8 +698,6 @@ bool CvCapture_FFMPEG::grabFrame()
|
|||||||
if (count_errs > max_number_of_attempts)
|
if (count_errs > max_number_of_attempts)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
av_free_packet (&packet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( valid && first_frame_number < 0 )
|
if( valid && first_frame_number < 0 )
|
||||||
|
Loading…
Reference in New Issue
Block a user