[libbluray-devel] Fixed TextST textbox size in rle encoder (was reading one line past buffer )

hpi1 git at videolan.org
Fri Jun 21 12:24:42 CEST 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Jun 21 13:21:53 2013 +0300| [b6fbda8c85adc418a717b3dc131cf12627978524] | committer: hpi1

Fixed TextST textbox size in rle encoder (was reading one line past buffer)

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=b6fbda8c85adc418a717b3dc131cf12627978524
---

 src/libbluray/decoders/graphics_controller.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index 6c7124f..fe367a3 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -836,7 +836,7 @@ static int _render_textst_region(GRAPHICS_CONTROLLER *p, int64_t pts, BD_TEXTST_
     rle_begin(&rle);
 
     for (y = 0, bmp_y = 0; y < style->region_info.region.height; y++) {
-        if (y < style->text_box.ypos || y > style->text_box.ypos + style->text_box.height) {
+        if (y < style->text_box.ypos || y >= style->text_box.ypos + style->text_box.height) {
             rle_add_bite(&rle, style->region_info.background_color, style->region_info.region.width);
         } else {
             rle_add_bite(&rle, style->region_info.background_color, style->text_box.xpos);



More information about the libbluray-devel mailing list