1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

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

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);