[vlc-devel] [PATCH] Android vout: Correctly display SPU on region change
hackndo
hackndo at gmail.com
Mon Oct 26 18:58:35 CET 2015
From: Romain Bentz <bentz.romain at gmail.com>
Previously, when SPU id was identical but its region changed, it wasn't correctly redrawn.
---
modules/video_output/android/android_window.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index 5cbf00a..d3b5e7f 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -127,6 +127,8 @@ struct vout_display_sys_t
bool b_has_subpictures;
uint8_t hash[16];
+
+ ARect memset_bounds;
};
#define PRIV_WINDOW_FORMAT_YV12 0x32315659
@@ -946,11 +948,17 @@ 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->memset_bounds, sizeof(ARect) ) == 0 ) {
return;
+ }
+
sys->i_sub_last_order = subpicture->i_order;
+ sys->memset_bounds = memset_bounds;
}
if (AndroidWindow_LockPicture(sys, sys->p_sub_window, sys->p_sub_pic) != 0)
--
2.4.9 (Apple Git-60)
More information about the vlc-devel
mailing list