From b8f025a58a8dddc42442527229a20b7e45edcc22 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 11 Aug 2014 23:08:35 +0200 Subject: video: don't keep multiple pointers to hwdec info struct This makes a certain corner case simpler at a later point. --- video/out/vo_vdpau.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'video/out/vo_vdpau.c') diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 949d149a55..7cf11543ed 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -73,6 +73,7 @@ struct vdpctx { struct vdp_functions *vdp; VdpDevice vdp_device; uint64_t preemption_counter; + struct mp_hwdec_info hwdec_info; struct m_color colorkey; @@ -1004,6 +1005,8 @@ static int preinit(struct vo *vo) return -1; } + vc->hwdec_info.vdpau_ctx = vc->mpvdp; + vc->video_mixer = mp_vdpau_mixer_create(vc->mpvdp, vo->log); if (mp_vdpau_guess_if_emulated(vc->mpvdp)) { @@ -1070,8 +1073,8 @@ static int control(struct vo *vo, uint32_t request, void *data) vo->want_redraw = true; return true; case VOCTRL_GET_HWDEC_INFO: { - struct mp_hwdec_info *arg = data; - arg->vdpau_ctx = vc->mpvdp; + struct mp_hwdec_info **arg = data; + *arg = &vc->hwdec_info; return true; } case VOCTRL_GET_PANSCAN: -- cgit v1.2.3