vo_gpu: hwdec_vaapi: set correct hw_imgfmt value

As documented on struct mp_hwdec_ctx, hw_imgfmt specifies the hardware
surface wrapper format for which supported_formats is valid. If this was
not set, f_hwtransfer ignored supported_formats, and assumed all formats
were supported.
This commit is contained in:
wm4 2020-01-17 15:08:46 +01:00
parent 40832773c1
commit 7ed6b5f44d
1 changed files with 1 additions and 0 deletions

View File

@ -157,6 +157,7 @@ static int init(struct ra_hwdec *hw)
return -1;
}
p->ctx->hwctx.hw_imgfmt = IMGFMT_VAAPI;
p->ctx->hwctx.supported_formats = p->formats;
p->ctx->hwctx.driver_name = hw->driver->name;
hwdec_devices_add(hw->devs, &p->ctx->hwctx);