From fd5efabdd9b0cfade1ce6aa9db7b46b581b794d4 Mon Sep 17 00:00:00 2001 From: Dietmar Schabus Date: Tue, 2 Jul 2024 06:45:05 +0200 Subject: [PATCH] Don't rely on nb_frames to be correct --- modules/videoio/src/cap_ffmpeg_impl.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp index 0546fbdfbe..1a4aa36d22 100644 --- a/modules/videoio/src/cap_ffmpeg_impl.hpp +++ b/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->streams[video_stream]->nb_frames > 0 && - frame_number > ic->streams[video_stream]->nb_frames ) - return false; - picture_pts = AV_NOPTS_VALUE_; #if USE_AV_INTERRUPT_CALLBACK