[vlc-commits] codec: cea708: fix CLW handling

Francois Cartegnie git at videolan.org
Fri Dec 29 20:08:16 CET 2017


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Dec 29 17:55:47 2017 +0100| [191e3c494b10d7b17a0ddaee2d1794a5a5c9e321] | committer: Francois Cartegnie

codec: cea708: fix CLW handling

(cherry picked from commit e5c07c5d5961291edc16382cdcf8b439e3888ec8)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=191e3c494b10d7b17a0ddaee2d1794a5a5c9e321
---

 modules/codec/cea708.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/modules/codec/cea708.c b/modules/codec/cea708.c
index 56df9bbe43..db03d44b81 100644
--- a/modules/codec/cea708.c
+++ b/modules/codec/cea708.c
@@ -1299,13 +1299,17 @@ static int CEA708_Decode_C1( uint8_t code, cea708_t *p_cea708 )
     {
         case CEA708_C1_CLW:
             REQUIRE_ARGS_AND_POP_COMMAND(1);
-            Debug(printf("[CLW]"));
-            if( p_cea708->p_cw->b_defined )
-            {
-                CEA708_Window_ClearText( p_cea708->p_cw );
-                if( p_cea708->p_cw->b_visible )
-                    i_ret |= CEA708_STATUS_OUTPUT;
-            }
+            Debug(printf("[CLW"));
+            for( i = 0, v = cea708_input_buffer_get( ib ); v; v = v >> 1, i++ )
+                if( v & 1 )
+                {
+                    if( p_cea708->window[i].b_defined &&
+                        p_cea708->window[i].b_visible )
+                        i_ret |= CEA708_STATUS_OUTPUT;
+                    CEA708_Window_ClearText( &p_cea708->window[i] );
+                    Debug(printf("%d", i));
+                }
+            Debug(printf("]"));
             break;
         case CEA708_C1_DSW:
             REQUIRE_ARGS_AND_POP_COMMAND(1);



More information about the vlc-commits mailing list