summaryrefslogtreecommitdiffstats
path: root/video/out/gl_hwdec_vdpau.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gl_hwdec_vdpau.c')
-rw-r--r--video/out/gl_hwdec_vdpau.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/gl_hwdec_vdpau.c b/video/out/gl_hwdec_vdpau.c
index 7a68ddd83f..c59d97bc1b 100644
--- a/video/out/gl_hwdec_vdpau.c
+++ b/video/out/gl_hwdec_vdpau.c
@@ -111,6 +111,10 @@ static int create(struct gl_hwdec *hw)
return -1;
p->vdp_surface = VDP_INVALID_HANDLE;
p->mixer = mp_vdpau_mixer_create(p->ctx, hw->log);
+ if (hw->reject_emulated && mp_vdpau_guess_if_emulated(p->ctx)) {
+ destroy(hw);
+ return -1;
+ }
hw->info->vdpau_ctx = p->ctx;
hw->converted_imgfmt = IMGFMT_RGB0;
return 0;