bug fixes.  write partial avi header at beginning so vlc can playback before completely written.