Mercurial > mplayer.hg
changeset 36122:cf45e1421a71
Search GLES library in more locations.
author | reimar |
---|---|
date | Sat, 04 May 2013 09:44:44 +0000 |
parents | 60f5fa453719 |
children | 99c8f7888cbe |
files | libvo/gl_common.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/gl_common.c Sat May 04 09:44:42 2013 +0000 +++ b/libvo/gl_common.c Sat May 04 09:44:44 2013 +0000 @@ -2232,7 +2232,16 @@ static void *eglgpa(const GLubyte *name) { void *res = eglGetProcAddress(name); if (!res) { - void *h = dlopen("/usr/lib/libGLESv1_CM.so", RTLD_LAZY); + static const char * const paths[] = { + "/usr/lib/libGLESv1_CM.so", + "/usr/lib/x86_64-linux-gnu/libGLESv1_CM.so", + "/usr/lib/i386-linux-gnu/libGLESv1_CM.so", + NULL}; + int i; + void *h = NULL; + for (i = 0; !h && paths[i]; i++) + h = dlopen(paths[i], RTLD_LAZY); + if (!h) return NULL; res = dlsym(h, name); dlclose(h); }