restore video.c to a working version