summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_vdpaupp.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_vdpaupp.c')
-rw-r--r--video/filter/vf_vdpaupp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/video/filter/vf_vdpaupp.c b/video/filter/vf_vdpaupp.c
index 6de8671e39..de5caa3534 100644
--- a/video/filter/vf_vdpaupp.c
+++ b/video/filter/vf_vdpaupp.c
@@ -136,11 +136,11 @@ static struct mp_filter *vf_vdpaupp_create(struct mp_filter *parent, void *optio
p->queue = mp_refqueue_alloc(f);
- AVBufferRef *ref = mp_filter_load_hwdec_device(f, IMGFMT_VDPAU);
- if (!ref)
+ struct mp_hwdec_ctx *hwdec_ctx =
+ mp_filter_load_hwdec_device(f, IMGFMT_VDPAU);
+ if (!hwdec_ctx || !hwdec_ctx->av_device_ref)
goto error;
- p->ctx = mp_vdpau_get_ctx_from_av(ref);
- av_buffer_unref(&ref);
+ p->ctx = mp_vdpau_get_ctx_from_av(hwdec_ctx->av_device_ref);
if (!p->ctx)
goto error;