Commit 1f939534 authored by Aaron Plattner's avatar Aaron Plattner
Browse files

Print dlerror() when various libdl calls fail.

Without printouts, it's impossible to tell why VDPAU initialization fails when
it can't open the backend or trace libraries or can't find various symbols.
parent 3bd1c7ef
......@@ -80,6 +80,7 @@ VdpStatus vdp_device_create_x11(
backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
free(vdpau_driver_lib);
if (!backend_dll) {
fprintf(stderr, "Failed to open VDPAU backend %s\n", dlerror());
_VDP_ERROR_BREAKPOINT();
return VDP_STATUS_NO_IMPLEMENTATION;
}
......@@ -91,6 +92,7 @@ VdpStatus vdp_device_create_x11(
trace_dll = dlopen("libvdpau_trace.so", RTLD_NOW | RTLD_GLOBAL);
if (!trace_dll) {
fprintf(stderr, "Failed to open VDPAU trace library %s\n", dlerror());
_VDP_ERROR_BREAKPOINT();
return VDP_STATUS_NO_IMPLEMENTATION;
}
......@@ -100,6 +102,7 @@ VdpStatus vdp_device_create_x11(
"vdp_trace_set_backend_handle"
);
if (!set_dll_handle) {
fprintf(stderr, "%s\n", dlerror());
_VDP_ERROR_BREAKPOINT();
return VDP_STATUS_NO_IMPLEMENTATION;
}
......@@ -119,6 +122,7 @@ VdpStatus vdp_device_create_x11(
func_name
);
if (!vdp_imp_device_create_x11) {
fprintf(stderr, "%s\n", dlerror());
_VDP_ERROR_BREAKPOINT();
return VDP_STATUS_NO_IMPLEMENTATION;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment