mirror of https://github.com/mpv-player/mpv
vo_vdpau: always try to native bit depth (makes 30 bit work)
Using vdpau on an X server configured to a bit depth of 30 (10 bit per component) failed finding a visual. The cause was a hack that tried to normalize the bit depth to 24 if it was not a known depth. It's unknown why/if this is needed, but the following things speak against it: - it prevented unusual bit depths like 30 bit from working - it wasn't needed with normal bit depth like 24 bit - it's probably copy-pasted from vo_x11 (where this code possibly makes sense, unlike in vo_vdpau) Just remove this code and look for a visual with native depth.
This commit is contained in:
parent
2131bdf5b7
commit
d49b58e78f
|
@ -851,7 +851,6 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
|
|||
XSetWindowAttributes xswa;
|
||||
XWindowAttributes attribs;
|
||||
unsigned long xswamask;
|
||||
int depth;
|
||||
|
||||
#ifdef CONFIG_XF86VM
|
||||
int vm = flags & VOFLAG_MODESWITCHING;
|
||||
|
@ -877,10 +876,8 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
|
|||
#endif
|
||||
XGetWindowAttributes(x11->display, DefaultRootWindow(x11->display),
|
||||
&attribs);
|
||||
depth = attribs.depth;
|
||||
if (depth != 15 && depth != 16 && depth != 24 && depth != 32)
|
||||
depth = 24;
|
||||
XMatchVisualInfo(x11->display, x11->screen, depth, TrueColor, &vinfo);
|
||||
XMatchVisualInfo(x11->display, x11->screen, attribs.depth, TrueColor,
|
||||
&vinfo);
|
||||
|
||||
xswa.background_pixel = 0;
|
||||
xswa.border_pixel = 0;
|
||||
|
|
Loading…
Reference in New Issue