video/out/android: don't assert-fail if WinID is not set

This matches the behavior of every other GPU context and is the only
behavior that makes sense.
This commit is contained in:
sfan5 committed 2025-02-11 19:19:36 +01:00
1 parent f385a6b253
commit bfa3e90867
1 file changed
+4 -1
+4 -1
View File
@@ -44,7 +44,10 @@ bool vo_android_init(struct vo *vo)
goto fail;
}
assert(vo->opts->WinID != 0 && vo->opts->WinID != -1);
if (vo->opts->WinID == 0 || vo->opts->WinID == -1) {
MP_FATAL(ctx, "Missing surface pointer\n");
goto fail;
}
jobject surface = (jobject)(intptr_t)vo->opts->WinID;
ctx->native_window = ANativeWindow_fromSurface(env, surface);
if (!ctx->native_window) {