summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/options.rst3
-rw-r--r--video/out/opengl/hwdec_vdpau.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index bd844e4a2d..27b24d0e98 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -987,8 +987,7 @@ Video
:auto: enable best hw decoder (see below)
:yes: exactly the same as ``auto``
:auto-copy: enable best hw decoder with copy-back (see below)
- :vdpau: requires ``--vo=gpu`` with ``--gpu-context=x11``,
- or ``--vo=vdpau`` (Linux only)
+ :vdpau: requires ``--vo=gpu`` with X11, or ``--vo=vdpau`` (Linux only)
:vdpau-copy: copies video back into system RAM (Linux with some GPUs only)
:vaapi: requires ``--vo=gpu`` or ``--vo=vaapi`` (Linux only)
:vaapi-copy: copies video back into system RAM (Linux with some GPUs only)
diff --git a/video/out/opengl/hwdec_vdpau.c b/video/out/opengl/hwdec_vdpau.c
index f865978f5b..ce0d32b3a9 100644
--- a/video/out/opengl/hwdec_vdpau.c
+++ b/video/out/opengl/hwdec_vdpau.c
@@ -18,8 +18,6 @@
#include <stddef.h>
#include <assert.h>
-#include <GL/glx.h>
-
#include "video/out/gpu/hwdec.h"
#include "ra_gl.h"
#include "video/vdpau.h"
@@ -49,7 +47,7 @@ struct priv {
static int init(struct ra_hwdec *hw)
{
- Display *x11disp = glXGetCurrentDisplay();
+ Display *x11disp = ra_get_native_resource(hw->ra, "x11");
if (!x11disp || !ra_is_gl(hw->ra))
return -1;
GL *gl = ra_gl_get(hw->ra);
@@ -313,7 +311,7 @@ static int mapper_map(struct ra_hwdec_mapper *mapper)
}
const struct ra_hwdec_driver ra_hwdec_vdpau = {
- .name = "vdpau-glx",
+ .name = "vdpau-gl",
.priv_size = sizeof(struct priv_owner),
.imgfmts = {IMGFMT_VDPAU, 0},
.init = init,