summaryrefslogtreecommitdiffstats
path: root/video/filter
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-22 18:04:59 +0100
committerwm4 <wm4@nowhere>2013-11-22 18:06:34 +0100
commitde22d2b1bafd2644b2ce6008f102427337796fd8 (patch)
treee0ceb06a7f0022e7f176c709dd69e86df5233e2b /video/filter
parent061927276751a3c7bc0b9c941e61d29b3ba29d7c (diff)
downloadmpv-de22d2b1bafd2644b2ce6008f102427337796fd8.tar.bz2
mpv-de22d2b1bafd2644b2ce6008f102427337796fd8.tar.xz
vf_vavpp: make it work with vo_opengl and software decoding
vo_opengl always loads the hwdec backend lazily, so hwdec_request_api() has to be called to possibly load it. This makes vf_vavpp work with software decoding. (Hardware decoding loads the backend before the filter is initialized, so this case is different.) Also, the VFCTRL_GET_HWDEC_INFO call doesn't need to be checked. If it fails, the info will be left blank.
Diffstat (limited to 'video/filter')
-rw-r--r--video/filter/vf_vavpp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c
index f9f77a1b64..49bef77e50 100644
--- a/video/filter/vf_vavpp.c
+++ b/video/filter/vf_vavpp.c
@@ -372,9 +372,9 @@ static int vf_open(vf_instance_t *vf, char *args)
vf->control = control;
struct vf_priv_s *p = vf->priv;
- struct mp_hwdec_info hwdec;
- if (vf_control(vf->next, VFCTRL_GET_HWDEC_INFO, &hwdec) <= 0)
- return false;
+ struct mp_hwdec_info hwdec = {0};
+ vf_control(vf->next, VFCTRL_GET_HWDEC_INFO, &hwdec);
+ hwdec_request_api(&hwdec, "vaapi");
p->va = hwdec.vaapi_ctx;
if (!p->va || !p->va->display)
return false;