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

Francois Cartegnie git at videolan.org
Fri Dec 29 20:06:54 CET 2017


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

codec: cea708: fix CLW handling

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

 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