Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workaround when reading broken video frames
Some videos are being read with additional fake/broken frames that may cause an unexpected early exit. This attempts to skip over these broken frames if more were expected, based on the initally acquired frame count. According to other reports upstream, the number of broken frames read varies. To avoid getting stuck in an endless loop, e.g. when the video is actually broken, this gives up after 1000 reads. see ultralytics#2064 see opencv/opencv#15352
- Loading branch information