[vlc-commits] Android vout: Correctly display SPU on region change
Romain Bentz
git at videolan.org
Mon Oct 26 19:27:52 CET 2015
vlc | branch: master | Romain Bentz <bentz.romain at gmail.com> | Mon Oct 26 18:58:35 2015 +0100| [97f1d2bdc1b9dd61cbe408d0cda9774c39b056cb] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=97f1d2bdc1b9dd61cbe408d0cda9774c39b056cb
---
modules/video_output/android/android_window.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index 5cbf00a..8f02c8a 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -123,6 +123,7 @@ struct vout_display_sys_t
buffer_bounds *p_sub_buffer_bounds;
bool b_sub_pic_locked;
int64_t i_sub_last_order;
+ ARect sub_last_region;
bool b_has_subpictures;
@@ -946,11 +947,16 @@ static void SubpicturePrepare(vout_display_t *vd, subpicture_t *subpicture)
vout_display_sys_t *sys = vd->sys;
ARect memset_bounds;
+ SubtitleRegionToBounds(subpicture, &memset_bounds);
+
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;
+
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)
More information about the vlc-commits
mailing list