vaapi_encode_mjpeg: Use CBS to store parameters and write headers