[vlc-devel] [PATCH 6/6] cea708: Fix failure to scroll in some cases

Devin Heitmueller dheitmueller at ltnglobal.com
Wed Jan 23 23:09:15 CET 2019


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>
---
 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 );
-- 
2.13.2



More information about the vlc-devel mailing list