[vlc-commits] [Git][videolan/vlc][master] android: display: clear the subtitle surface on close

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu May 25 09:21:30 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
8ddff4f7 by Thomas Guillem at 2023-05-25T09:01:41+00:00
android: display: clear the subtitle surface on close

So that the last subtitle is not displayed when playing a next media.

- - - - -


1 changed file:

- modules/video_output/android/display.c


Changes:

=====================================
modules/video_output/android/display.c
=====================================
@@ -247,7 +247,15 @@ static void subpicture_CloseDisplay(vout_display_t *vd)
     struct sys *sys = vd->sys;
     struct subpicture *sub = &sys->sub;
 
-    vlc_gl_MakeCurrent(sub->gl);
+    int ret = vlc_gl_MakeCurrent(sub->gl);
+
+    if (ret == 0)
+    {
+        /* Clear the surface */
+        sub->api.vt.ClearColor(0.f, 0.f, 0.f, 0.f);
+        sub->api.vt.Clear(GL_COLOR_BUFFER_BIT);
+        vlc_gl_Swap(sub->gl);
+    }
 
     vlc_gl_sub_renderer_Delete(sub->renderer);
     vlc_gl_interop_Delete(sub->interop);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8ddff4f79ca0646d4d9311f5f2b0bff4f847a6d0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8ddff4f79ca0646d4d9311f5f2b0bff4f847a6d0
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