From 7ed6b5f44d755bffce76fc9cc2196364484609bd Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 17 Jan 2020 15:08:46 +0100 Subject: 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. --- video/out/hwdec/hwdec_vaapi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'video') diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c index a7a772cc0f..3ed9602400 100644 --- a/video/out/hwdec/hwdec_vaapi.c +++ b/video/out/hwdec/hwdec_vaapi.c @@ -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); -- cgit v1.2.3