avcodec/ffv1enc: Allocate smaller packet if the worst case size cannot be allocated