[MPlayer-cvslog] r36216 - trunk/libvo/gl_common.c

reimar subversion at mplayerhq.hu
Sat May 4 11:44:45 CEST 2013


Author: reimar
Date: Sat May  4 11:44:44 2013
New Revision: 36216

Log:
Search GLES library in more locations.

Modified:
   trunk/libvo/gl_common.c

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	Sat May  4 11:44:42 2013	(r36215)
+++ trunk/libvo/gl_common.c	Sat May  4 11:44:44 2013	(r36216)
@@ -2232,7 +2232,16 @@ EGLNativeWindowType android_createDispla
 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);
   }


More information about the MPlayer-cvslog mailing list