summaryrefslogtreecommitdiffstats
path: root/video/out/vo_vaapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_vaapi.c')
-rw-r--r--video/out/vo_vaapi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/video/out/vo_vaapi.c b/video/out/vo_vaapi.c
index 7e32563395..3c760ac07c 100644
--- a/video/out/vo_vaapi.c
+++ b/video/out/vo_vaapi.c
@@ -70,6 +70,7 @@ struct priv {
struct vo *vo;
VADisplay display;
struct mp_vaapi_ctx *mpvaapi;
+ struct mp_hwdec_info hwdec_info;
struct mp_image_params image_params;
struct mp_rect src_rect;
@@ -516,8 +517,8 @@ static int control(struct vo *vo, uint32_t request, void *data)
p->deint = *(int*)data ? p->deint_type : 0;
return VO_TRUE;
case VOCTRL_GET_HWDEC_INFO: {
- struct mp_hwdec_info *arg = data;
- arg->vaapi_ctx = p->mpvaapi;
+ struct mp_hwdec_info **arg = data;
+ *arg = &p->hwdec_info;
return true;
}
case VOCTRL_GET_COLORSPACE: {
@@ -598,6 +599,8 @@ static int preinit(struct vo *vo)
goto fail;
}
+ p->hwdec_info.vaapi_ctx = p->mpvaapi;
+
if (va_guess_if_emulated(p->mpvaapi)) {
MP_WARN(vo, "VA-API is most likely emulated via VDPAU.\n"
"It's better to use VDPAU directly with: --vo=vdpau\n");