Don't rely on nb_frames to be correct

pull/25844/head
Dietmar Schabus 5 months ago
parent 39a7b3d186
commit fd5efabdd9
  1. 4
      modules/videoio/src/cap_ffmpeg_impl.hpp

@ -1485,10 +1485,6 @@ bool CvCapture_FFMPEG::grabFrame()
if( !ic || !video_st || (!rawMode && !context) ) return false; if( !ic || !video_st || (!rawMode && !context) ) return false;
if( ic->streams[video_stream]->nb_frames > 0 &&
frame_number > ic->streams[video_stream]->nb_frames )
return false;
picture_pts = AV_NOPTS_VALUE_; picture_pts = AV_NOPTS_VALUE_;
#if USE_AV_INTERRUPT_CALLBACK #if USE_AV_INTERRUPT_CALLBACK

Loading…
Cancel
Save