Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 477666 | Differences between
and this patch

Collapse All | Expand All

(-)b/src/vdpau_wrapper.c (-6 / +20 lines)
Lines 98-103 Link Here
98
    return driver_name;
98
    return driver_name;
99
}
99
}
100
100
101
static char const * _vdpau_module_search_paths[] = {
102
    "${ORIGIN}/vdpau/",
103
    VDPAU_MODULEDIR "/",
104
    "/usr/lib/vdpau/",
105
    "",
106
    NULL
107
};
108
101
static VdpStatus _vdp_open_driver(
109
static VdpStatus _vdp_open_driver(
102
    Display *             display,
110
    Display *             display,
103
    int                   screen)
111
    int                   screen)
Lines 107-112 Link Here
107
    char         vdpau_driver_lib[PATH_MAX];
115
    char         vdpau_driver_lib[PATH_MAX];
108
    char const * vdpau_trace;
116
    char const * vdpau_trace;
109
    char const * func_name;
117
    char const * func_name;
118
    char const ** module_path;
110
119
111
    vdpau_driver = getenv("VDPAU_DRIVER");
120
    vdpau_driver = getenv("VDPAU_DRIVER");
112
    if (!vdpau_driver) {
121
    if (!vdpau_driver) {
Lines 118-129 Link Here
118
    }
127
    }
119
128
120
    _vdp_driver_dll = NULL;
129
    _vdp_driver_dll = NULL;
121
    if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT,
130
122
                 VDPAU_MODULEDIR "/", vdpau_driver, ".1") >=
131
    for (module_path = _vdpau_module_search_paths; *module_path; ++module_path) {
123
            sizeof(vdpau_driver_lib)) {
132
        if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT,
124
        fprintf(stderr, "Failed to construct driver path: path too long\n");
133
                     *module_path, vdpau_driver, ".1") >= sizeof(vdpau_driver_lib)) {
125
    } else {
134
            fprintf(stderr, "Failed to construct driver path: path too long\n");
126
        _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
135
        } else {
136
            _vdp_driver_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
137
            if (_vdp_driver_dll) {
138
                break;
139
            }
140
        }
127
    }
141
    }
128
142
129
    if (!_vdp_driver_dll) {
143
    if (!_vdp_driver_dll) {

Return to bug 477666