mirror of https://github.com/mpv-player/mpv
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:
parent
40832773c1
commit
7ed6b5f44d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue