Skip to content

The video reader leaves the video files openned

Looks like the video reader bob.io.video.reader does not close the video file when iterating over frames AND the iteration does not finish fully.

For example:

video = bob.io.base.load('testvideo.avi')
# closes the video file properly

for frame in reader('testvideo.avi'):
    pass
# closes the video file properly

for frame in reader('testvideo.avi'):
    break
# the video file is left open!
import gc
gc.collect()
# the video file is still open!