h264: check for invalid zeros_left before writing