[vlc-devel] [PATCH] android_window: fix subtitle clear area too big

Thomas Guillem thomas at gllm.fr
Fri Nov 28 15:34:13 CET 2014


This led to a memory corruption.
---
 modules/video_output/android/android_window.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index b08e00f..e584a54 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -834,8 +834,8 @@ static void SubtitleRegionToBounds(subpicture_t *subpicture,
 
             new_bounds.left = r->i_x;
             new_bounds.top = r->i_y;
-            new_bounds.right = r->fmt.i_width + r->i_x;
-            new_bounds.bottom = r->fmt.i_height + r->i_y;
+            new_bounds.right = r->fmt.i_visible_width + r->i_x;
+            new_bounds.bottom = r->fmt.i_visible_height + r->i_y;
             if (r == &subpicture->p_region[0])
                 *p_out_bounds = new_bounds;
             else {
-- 
2.1.3




More information about the vlc-devel mailing list