Commit 97f1d2bd authored by Romain Bentz's avatar Romain Bentz Committed by Jean-Baptiste Kempf

Android vout: Correctly display SPU on region change

Previously, when SPU id was identical but its region changed, it wasn't correctly redrawn.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 32adc07b
...@@ -123,6 +123,7 @@ struct vout_display_sys_t ...@@ -123,6 +123,7 @@ struct vout_display_sys_t
buffer_bounds *p_sub_buffer_bounds; buffer_bounds *p_sub_buffer_bounds;
bool b_sub_pic_locked; bool b_sub_pic_locked;
int64_t i_sub_last_order; int64_t i_sub_last_order;
ARect sub_last_region;
bool b_has_subpictures; bool b_has_subpictures;
...@@ -946,11 +947,16 @@ static void SubpicturePrepare(vout_display_t *vd, subpicture_t *subpicture) ...@@ -946,11 +947,16 @@ static void SubpicturePrepare(vout_display_t *vd, subpicture_t *subpicture)
vout_display_sys_t *sys = vd->sys; vout_display_sys_t *sys = vd->sys;
ARect memset_bounds; ARect memset_bounds;
SubtitleRegionToBounds(subpicture, &memset_bounds);
if( subpicture ) if( subpicture )
{ {
if( subpicture->i_order == sys->i_sub_last_order ) if( subpicture->i_order == sys->i_sub_last_order
&& memcmp( &memset_bounds, &sys->sub_last_region, sizeof(ARect) ) == 0 )
return; return;
sys->i_sub_last_order = subpicture->i_order; sys->i_sub_last_order = subpicture->i_order;
sys->sub_last_region = memset_bounds;
} }
if (AndroidWindow_LockPicture(sys, sys->p_sub_window, sys->p_sub_pic) != 0) if (AndroidWindow_LockPicture(sys, sys->p_sub_window, sys->p_sub_pic) != 0)
......
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