diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2009-02-14 15:16:29 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2009-02-14 15:16:29 -0800 |
commit | 1f9395341d09886a95a0d4fdad6c2a359c0d636d (patch) | |
tree | 11692cd17f72c37b4bf66b9351b770dd17cc97dc | |
parent | 3bd1c7efd002973e673fd88ef37c15ddd6e028ae (diff) |
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.
-rw-r--r-- | src/vdpau_wrapper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vdpau_wrapper.c b/src/vdpau_wrapper.c index 54e81b4..2687c31 100644 --- a/src/vdpau_wrapper.c +++ b/src/vdpau_wrapper.c @@ -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; } |