summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-17 16:03:20 +0100
committerKevin Mitchell <kevmitch@gmail.com>2017-12-17 11:00:51 -0800
commit9ed8ca2529524665129b6892e21740c2217286c2 (patch)
tree4ba86262ffbb3bd628e4ce58284befdc7406d8d0 /video/out
parentb0d0bc57008c88f1e840caa9e230f242cff29b64 (diff)
downloadmpv-9ed8ca2529524665129b6892e21740c2217286c2.tar.bz2
mpv-9ed8ca2529524665129b6892e21740c2217286c2.tar.xz
vo_gpu: hwdec_drmprime_drm: don't crash for non-GL contexts
Using vulkan with --hwdec crashed because of this.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/opengl/hwdec_drmprime_drm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec_drmprime_drm.c b/video/out/opengl/hwdec_drmprime_drm.c
index 691779a02e..faa099a95e 100644
--- a/video/out/opengl/hwdec_drmprime_drm.c
+++ b/video/out/opengl/hwdec_drmprime_drm.c
@@ -205,6 +205,9 @@ static int init(struct ra_hwdec *hw)
struct priv *p = hw->priv;
int drm_overlay;
+ if (!ra_is_gl(hw->ra))
+ return -1;
+
p->log = hw->log;
void *tmp = talloc_new(NULL);