[vlc-commits] Android vout: Correctly clear SPU regions when Close() is called

Romain Bentz git at videolan.org
Tue Oct 27 18:20:11 CET 2015


vlc | branch: master | Romain Bentz <bentz.romain at gmail.com> | Tue Oct 27 17:48:34 2015 +0100| [96a08736553fa98dfebc1dc16bcc41de163cd49e] | committer: Jean-Baptiste Kempf

Android vout: Correctly clear SPU regions when Close() is called

Previously, when Close() was called, SPU region were not properly cleared.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=96a08736553fa98dfebc1dc16bcc41de163cd49e
---

 modules/video_output/android/android_window.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index e85d503..b371188 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -50,6 +50,7 @@
 #define CFG_PREFIX "androidwindow-"
 static int  Open (vlc_object_t *);
 static void Close(vlc_object_t *);
+static void SubpicturePrepare(vout_display_t *vd, subpicture_t *subpicture);
 
 vlc_module_begin()
     set_category(CAT_VIDEO)
@@ -759,6 +760,15 @@ static void Close(vlc_object_t *p_this)
     if (!sys)
         return;
 
+    /* Check if SPU regions have been properly cleared, and clear them if they
+     * were not. */
+    if (sys->b_has_subpictures)
+    {
+        SubpicturePrepare(vd, NULL);
+        if (sys->b_sub_pic_locked)
+            AndroidWindow_UnlockPicture(sys, sys->p_sub_window, sys->p_sub_pic, true);
+    }
+
     if (sys->pool)
         picture_pool_Release(sys->pool);
     if (sys->p_window)



More information about the vlc-commits mailing list