[vlc-commits] codec: spudec: skip COLCON commands
Francois Cartegnie
git at videolan.org
Mon Jan 13 18:09:49 CET 2020
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 19 14:42:36 2019 +0100| [162741ffb91013f4013768aa20b13202b4beff3f] | committer: Francois Cartegnie
codec: spudec: skip COLCON commands
(cherry picked from commit 168362cc9e2fa04cd5c41b520c23f942028d3bcb)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=162741ffb91013f4013768aa20b13202b4beff3f
---
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 02e69a803e..bd0e0e0b35 100644
--- a/modules/codec/spudec/parse.c
+++ b/modules/codec/spudec/parse.c
@@ -351,6 +351,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 0608769590..7f49269655 100644
--- a/modules/codec/spudec/spudec.h
+++ b/modules/codec/spudec/spudec.h
@@ -54,6 +54,7 @@ struct decoder_sys_t
#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