[vlc-commits] [Git][videolan/vlc][master] android: display: don't open without layout listener

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Jun 16 11:08:49 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
7e0b66a0 by Romain Roffé at 2023-06-16T10:45:34+00:00
android: display: don't open without layout listener

Fixes regression from 66eb96707f170390daf7de51807e22511009c2bf

Since we (wrongly) assumed that the layout listener was tied to the
presence of the subtitle surface.

- - - - -


1 changed file:

- modules/video_output/android/display.c


Changes:

=====================================
modules/video_output/android/display.c
=====================================
@@ -481,9 +481,12 @@ static int Open(vout_display_t *vd,
                 video_format_t *fmtp, vlc_video_context *context)
 {
     vlc_window_t *embed = vd->cfg->window;
+    AWindowHandler *awh = embed->display.anativewindow;
+
     if (embed->type != VLC_WINDOW_TYPE_ANDROID_NATIVE
      || fmtp->i_chroma != VLC_CODEC_ANDROID_OPAQUE
-     || context == NULL)
+     || context == NULL
+     || !AWindowHandler_canSetVideoLayout(awh))
         return VLC_EGENERIC;
 
     if (!vd->obj.force && fmtp->projection_mode != PROJECTION_MODE_RECTANGULAR)
@@ -499,7 +502,7 @@ static int Open(vout_display_t *vd,
 
     video_format_ApplyRotation(&sys->fmt, fmtp);
 
-    sys->awh = embed->display.anativewindow;
+    sys->awh = awh;
     sys->avctx = vlc_video_context_GetPrivate(context, VLC_VIDEO_CONTEXT_AWINDOW);
     assert(sys->avctx);
     if (sys->avctx->texture != NULL)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7e0b66a00f10751787b8b952760e6436a80f0d54

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/7e0b66a00f10751787b8b952760e6436a80f0d54
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list