[vlc-devel] [PATCH] android: utils: avoid non-android windows
Alexandre Janniaux
ajanni at videolabs.io
Thu Jan 21 09:33:51 UTC 2021
When using opengl callbacks on Android, a dummy window is passed instead
of NULL or an Android window. As long as JVM has been given, we can
still create the AWindowHandler for the decoder device though.
---
modules/video_output/android/utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/video_output/android/utils.c b/modules/video_output/android/utils.c
index e46b8e004d..c4c549e476 100644
--- a/modules/video_output/android/utils.c
+++ b/modules/video_output/android/utils.c
@@ -818,6 +818,9 @@ AWindowHandler_new(vlc_object_t *obj, vout_window_t *wnd, awh_events_t *p_events
#define AWINDOW_REGISTER_FLAGS_SUCCESS 0x1
#define AWINDOW_REGISTER_FLAGS_HAS_VIDEO_LAYOUT_LISTENER 0x2
+ if (wnd->type != VOUT_WINDOW_TYPE_ANDROID_NATIVE)
+ wnd = NULL;
+
AWindowHandler *p_awh;
JNIEnv *p_env;
JavaVM *p_jvm = var_InheritAddress(obj, "android-jvm");
--
2.30.0
More information about the vlc-devel
mailing list