This fixes the behaviour of the camera not being free if starting and stopping the video too quickly.