[vlc-commits] codec: spudec: skip COLCON commands

Francois Cartegnie git at videolan.org
Sat Jan 4 21:02:50 CET 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 19 14:42:36 2019 +0100| [168362cc9e2fa04cd5c41b520c23f942028d3bcb] | committer: Francois Cartegnie

codec: spudec: skip COLCON commands

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

 modules/codec/spudec/parse.c  | 10 ++++++++++
 modules/codec/spudec/spudec.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/modules/codec/spudec/parse.c b/modules/codec/spudec/parse.c
index 5e1b7175a8..49df70f496 100644
--- a/modules/codec/spudec/parse.c
+++ b/modules/codec/spudec/parse.c
@@ -349,6 +349,16 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t *p_spu,
             i_index += 5;
             break;
 
+        case SPU_CMD_SET_COLCON:
+            if( i_index + 3 > p_sys->i_spu_size )
+            {
+                msg_Err( p_dec, "overflow in SPU command" );
+                return VLC_EGENERIC;
+            }
+
+            i_index += 1 + GetWBE(&p_sys->buffer[i_index+1]);
+            break;
+
         case SPU_CMD_END: /* ff (end) */
             if( b_cmd_offset )
             {
diff --git a/modules/codec/spudec/spudec.h b/modules/codec/spudec/spudec.h
index 363624eb26..976245bdf5 100644
--- a/modules/codec/spudec/spudec.h
+++ b/modules/codec/spudec/spudec.h
@@ -53,6 +53,7 @@ typedef struct
 #define SPU_CMD_SET_ALPHACHANNEL    0x04
 #define SPU_CMD_SET_COORDINATES     0x05
 #define SPU_CMD_SET_OFFSETS         0x06
+#define SPU_CMD_SET_COLCON          0x07
 #define SPU_CMD_END                 0xff
 
 /*****************************************************************************



More information about the vlc-commits mailing list