Commit 96a08736 authored by Romain Bentz's avatar Romain Bentz Committed by 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: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 17a10dc6
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment