[Android] [PATCH 2/2] Update surface object when it's destroyed and recreated.

Paulo Vitor Magacho da Silva pvmagacho at gmail.com
Fri Dec 5 02:17:31 CET 2014


---
 libvlc/jni/vout.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libvlc/jni/vout.c b/libvlc/jni/vout.c
index 04c933c..6362f0c 100644
--- a/libvlc/jni/vout.c
+++ b/libvlc/jni/vout.c
@@ -53,6 +53,11 @@ void jni_UnlockAndroidSurface() {
     pthread_mutex_unlock(&vout_android_lock);
 }
 
+bool jni_LockAndGetIsSurfaceAttached() {
+    pthread_mutex_unlock(&vout_android_lock);
+    return vout_android_java_surf != NULL;
+}
+
 void jni_EventHardwareAccelerationError()
 {
     JNIEnv *env;
-- 
1.9.3 (Apple Git-50)



More information about the Android mailing list