[vlc-commits] cea708: Fix failure to scroll in some cases

Devin Heitmueller git at videolan.org
Sat Jan 26 00:36:25 CET 2019


vlc | branch: master | Devin Heitmueller <dheitmueller at ltnglobal.com> | Wed Jan 23 17:09:15 2019 -0500| [9868c4be81c9d4ae45f76463fa2a76629dc92dce] | committer: Jean-Baptiste Kempf

cea708: Fix failure to scroll in some cases

The window "rc" member actually contains one less than the real row
count (See CTA-708E Sec 8.10.5.2 definition of "rc" member).  Hence
we need to take that into account when determining whether to do
a scroll or just increase the row location.  Without this change we
will trample an existing row, for example if CEA708_Window_RowCount()
is 2 and i_row_count = 3.

Signed-off-by: Devin Heitmueller <dheitmueller at ltnglobal.com>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9868c4be81c9d4ae45f76463fa2a76629dc92dce
---

 modules/codec/cea708.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/cea708.c b/modules/codec/cea708.c
index 8c5d11fb17..e5438edc98 100644
--- a/modules/codec/cea708.c
+++ b/modules/codec/cea708.c
@@ -1530,7 +1530,7 @@ static int CEA708_Decode_C1( uint8_t code, cea708_t *p_cea708 )
                 p_cea708->p_cw->i_anchor_offset_h = v;
                 v = cea708_input_buffer_get( ib );
                 p_cea708->p_cw->anchor_point = v >> 4;
-                p_cea708->p_cw->i_row_count = v & 0x0F;
+                p_cea708->p_cw->i_row_count = (v & 0x0F) + 1;
                 v = cea708_input_buffer_get( ib );
                 p_cea708->p_cw->i_col_count = v & 0x3F;
                 v = cea708_input_buffer_get( ib );



More information about the vlc-commits mailing list