Backport PR #3813 to 2.4

It has already been partially backported by #6199; this commit completes
the backport.
This commit is contained in:
Roman Donchenko 2016-03-15 14:13:31 +03:00
parent 9d49cef29e
commit 9a5d7f1a0b

View File

@ -853,8 +853,6 @@ 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
@ -917,8 +915,6 @@ bool CvCapture_FFMPEG::grabFrame()
if (count_errs > max_number_of_attempts)
break;
}
av_free_packet (&packet);
}
if( valid && first_frame_number < 0 )