Attempt to add very rudimentary bounds checking to video. Untested.