summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_vavpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_vavpp.c')
-rw-r--r--video/filter/vf_vavpp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c
index ec39772865..4e39affd41 100644
--- a/video/filter/vf_vavpp.c
+++ b/video/filter/vf_vavpp.c
@@ -391,8 +391,10 @@ static int vf_open(vf_instance_t *vf)
vf->control = control;
struct vf_priv_s *p = vf->priv;
+ if (!vf->hwdec)
+ return false;
hwdec_request_api(vf->hwdec, "vaapi");
- p->va = vf->hwdec ? vf->hwdec->vaapi_ctx : NULL;
+ p->va = vf->hwdec->hwctx ? vf->hwdec->hwctx->vaapi_ctx : NULL;
if (!p->va || !p->va->display)
return false;
p->display = p->va->display;