[vlc-commits] androidsurface: Only use ANativeWindow if the private symbols aren't found

Martin Storsjö git at videolan.org
Mon Jul 29 10:04:00 CEST 2013


vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Jul 29 10:55:42 2013 +0300| [7c52aacbe94dd1f1b5958a2e000d39e784258ebc] | committer: Martin Storsjö

androidsurface: Only use ANativeWindow if the private symbols aren't found

Even if ANativeWindow is a public API, the release call seems to
crash on a Nexus One (running 2.3) and on a Galaxy Tab (running 3.2).
The exact reason is not known or understood yet, but it might be
due to accessing and dealing with the Surface from both Java (via the
SurfaceHolder class) and via the ANativeWindow API.

Therefore, only use the ANativeWindow if the old methods aren't
found (that is, on 4.3).

The ANativeWindow output works fine on firmwares as early as 4.0
though.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c52aacbe94dd1f1b5958a2e000d39e784258ebc
---

 modules/video_output/androidsurface.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/androidsurface.c b/modules/video_output/androidsurface.c
index ae70bc3..d0cbbd1d 100644
--- a/modules/video_output/androidsurface.c
+++ b/modules/video_output/androidsurface.c
@@ -219,9 +219,9 @@ static int Open(vlc_object_t *p_this)
     }
 
     /* */
-    sys->p_library = InitLibrary2(sys);
+    sys->p_library = InitLibrary(sys);
     if (!sys->p_library)
-        sys->p_library = InitLibrary(sys);
+        sys->p_library = InitLibrary2(sys);
     if (!sys->p_library) {
         free(sys);
         msg_Err(vd, "Could not initialize libandroid.so/libui.so/libgui.so/libsurfaceflinger_client.so!");



More information about the vlc-commits mailing list