- output_surface = (VASurfaceID)(uintptr_t)output_frame->data[3];
- av_log(avctx, AV_LOG_DEBUG, "Using surface %#x for misc vpp output.\n",
- output_surface);
- memset(¶ms, 0, sizeof(params));
- input_region = (VARectangle) {
- .x = 0,
- .y = 0,
- .width = input_frame->width,
- .height = input_frame->height,
- };
+ err = av_frame_copy_props(output_frame, input_frame);
+ if (err < 0)
+ goto fail;
+
+ err = ff_vaapi_vpp_init_params(avctx, ¶ms,
+ input_frame, output_frame);
+ if (err < 0)
+ goto fail;