[vlc-commits] androidsurface: Release the ANativeWindow before closing the dlopened library
Martin Storsjö
git at videolan.org
Mon Jul 29 16:11:33 CEST 2013
vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Jul 29 17:05:36 2013 +0300| [9f5c45fa0e266b202dd431a134774ac7e2cf7251] | committer: Martin Storsjö
androidsurface: Release the ANativeWindow before closing the dlopened library
This fixes ANativeWindow usage on 2.3 and 3.x. Therefore, revert
back to preferring ANativeWindow over the private symbols.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9f5c45fa0e266b202dd431a134774ac7e2cf7251
---
modules/video_output/androidsurface.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/androidsurface.c b/modules/video_output/androidsurface.c
index d0cbbd1d..a2383a5 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 = InitLibrary(sys);
+ sys->p_library = InitLibrary2(sys);
if (!sys->p_library)
- sys->p_library = InitLibrary2(sys);
+ sys->p_library = InitLibrary(sys);
if (!sys->p_library) {
free(sys);
msg_Err(vd, "Could not initialize libandroid.so/libui.so/libgui.so/libsurfaceflinger_client.so!");
@@ -323,9 +323,9 @@ static void Close(vlc_object_t *p_this)
vout_display_sys_t *sys = vd->sys;
picture_pool_Delete(sys->pool);
- dlclose(sys->p_library);
if (sys->window)
sys->s_winRelease(sys->window);
+ dlclose(sys->p_library);
free(sys);
vlc_mutex_unlock(&single_instance);
}
More information about the vlc-commits
mailing list