[vlc-commits] cea708: Fix TB scrolling
Devin Heitmueller
git at videolan.org
Sat Jan 26 00:36:20 CET 2019
vlc | branch: master | Devin Heitmueller <dheitmueller at ltnglobal.com> | Wed Jan 23 17:09:11 2019 -0500| [db96c022fa45a7618c93dcc8d6b81ebeb2d01e0f] | committer: Jean-Baptiste Kempf
cea708: Fix TB scrolling
The decision when to truncate was being made based on the first
row in the array, but for TB scrolling we need to be checking
the last row. Presumably this is a cut/paste error from the
above code block for BT scrolling.
Also, the for loop for the copy needs to include the first
entry, since i_firstrow gets incremented implicitly by the
truncate operation.
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=db96c022fa45a7618c93dcc8d6b81ebeb2d01e0f
---
modules/codec/cea708.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/cea708.c b/modules/codec/cea708.c
index 3af226a6c6..34b2f37d4a 100644
--- a/modules/codec/cea708.c
+++ b/modules/codec/cea708.c
@@ -696,9 +696,9 @@ static void CEA708_Window_Scroll( cea708_window_t *p_w )
break;
case CEA708_WA_DIRECTION_TB:
/* Move DOWN */
- if( p_w->i_firstrow == CEA708_WINDOW_MAX_ROWS - 1 )
+ if( p_w->i_lastrow == CEA708_WINDOW_MAX_ROWS - 1 )
CEA708_Window_Truncate( p_w, CEA708_WA_DIRECTION_TB );
- for( int i=p_w->i_lastrow; i > p_w->i_firstrow; i-- )
+ for( int i=p_w->i_lastrow; i >= p_w->i_firstrow; i-- )
p_w->rows[i+1] = p_w->rows[i];
p_w->rows[p_w->i_firstrow] = NULL;
p_w->i_firstrow++;
More information about the vlc-commits
mailing list