rawvideo: fix handling of zero dimensions