Videocapture now correctly captures video and does not freeze when stop button is pressed.