libva-vdpau-driver remove
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
Index: vdpau-video-0.7.4/src/vdpau_driver.c
|
||||
===================================================================
|
||||
--- vdpau-video-0.7.4.orig/src/vdpau_driver.c
|
||||
+++ vdpau-video-0.7.4/src/vdpau_driver.c
|
||||
@@ -174,7 +174,7 @@ vdpau_common_Terminate(vdpau_driver_data
|
||||
}
|
||||
vdpau_gate_exit(driver_data);
|
||||
|
||||
- if (driver_data->vdp_dpy) {
|
||||
+ if (!driver_data->x_fallback && driver_data->vdp_dpy) {
|
||||
XCloseDisplay(driver_data->vdp_dpy);
|
||||
driver_data->vdp_dpy = NULL;
|
||||
}
|
||||
@@ -187,9 +187,14 @@ vdpau_common_Initialize(vdpau_driver_dat
|
||||
/* Create a dedicated X11 display for VDPAU purposes */
|
||||
const char * const x11_dpy_name = XDisplayString(driver_data->x11_dpy);
|
||||
driver_data->vdp_dpy = XOpenDisplay(x11_dpy_name);
|
||||
- if (!driver_data->vdp_dpy)
|
||||
- return VA_STATUS_ERROR_UNKNOWN;
|
||||
-
|
||||
+ /* Fallback to existing X11 display */
|
||||
+ driver_data->x_fallback = false;
|
||||
+ if (!driver_data->vdp_dpy) {
|
||||
+ driver_data->x_fallback = true;
|
||||
+ driver_data->vdp_dpy = driver_data->x11_dpy;
|
||||
+ printf("Failed to create dedicated X11 display!\n");
|
||||
+ }
|
||||
+
|
||||
VdpStatus vdp_status;
|
||||
driver_data->vdp_device = VDP_INVALID_HANDLE;
|
||||
vdp_status = vdp_device_create_x11(
|
||||
Index: vdpau-video-0.7.4/src/vdpau_driver.h
|
||||
===================================================================
|
||||
--- vdpau-video-0.7.4.orig/src/vdpau_driver.h
|
||||
+++ vdpau-video-0.7.4/src/vdpau_driver.h
|
||||
@@ -21,6 +21,7 @@
|
||||
#ifndef VDPAU_DRIVER_H
|
||||
#define VDPAU_DRIVER_H
|
||||
|
||||
+#include <stdbool.h>
|
||||
#include <va/va_backend.h>
|
||||
#include "vaapi_compat.h"
|
||||
#include "vdpau_gate.h"
|
||||
@@ -100,6 +101,7 @@ struct vdpau_driver_data {
|
||||
uint64_t va_display_attrs_mtime[VDPAU_MAX_DISPLAY_ATTRIBUTES];
|
||||
unsigned int va_display_attrs_count;
|
||||
char va_vendor[256];
|
||||
+ bool x_fallback;
|
||||
};
|
||||
|
||||
typedef struct object_config *object_config_p;
|
||||
Reference in New Issue
Block a user