diff options
author | wm4 <wm4@nowhere> | 2014-08-11 23:08:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-11 23:09:39 +0200 |
commit | b8f025a58a8dddc42442527229a20b7e45edcc22 (patch) | |
tree | 62f61b447bb122bf16656cdf80e175c9ff1f367e /video/out/vo_vaapi.c | |
parent | 056622c33e2ba305df4b1602149af01967bbb9ca (diff) | |
download | mpv-b8f025a58a8dddc42442527229a20b7e45edcc22.tar.bz2 mpv-b8f025a58a8dddc42442527229a20b7e45edcc22.tar.xz |
video: don't keep multiple pointers to hwdec info struct
This makes a certain corner case simpler at a later point.
Diffstat (limited to 'video/out/vo_vaapi.c')
-rw-r--r-- | video/out/vo_vaapi.c | 7 |
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"); |