]> git.sesse.net Git - vlc/commitdiff
When no start display time is found in a subpicture then return with an error message...
authorJean-Paul Saman <jpsaman@videolan.org>
Tue, 23 Jan 2007 08:09:38 +0000 (08:09 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Tue, 23 Jan 2007 08:09:38 +0000 (08:09 +0000)
modules/codec/spudec/parse.c

index f747c43818bebb3f0e2d59fc2e9b008184776a52..9617aec45e59a0589fb40eddc3ab60cae9fa19f4 100644 (file)
@@ -147,6 +147,9 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t *p_spu,
     uint8_t i_command = SPU_CMD_END;
     mtime_t date = 0;
 
+    if( !p_spu || !p_spu_data )
+        return VLC_EGENERIC;
+
     /* Initialize the structure */
     p_spu->i_start = p_spu->i_stop = 0;
     p_spu->b_ephemer = VLC_FALSE;
@@ -205,7 +208,6 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t *p_spu,
             break;
 
         case SPU_CMD_SET_PALETTE:
-
             /* 03xxxx (palette) */
             if( i_index + 3 > p_sys->i_spu_size )
             {
@@ -350,6 +352,7 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t *p_spu,
     if( !p_spu->i_start )
     {
         msg_Err( p_dec, "no `start display' command" );
+        return VLC_EGENERIC;
     }
 
     if( p_spu->i_stop <= p_spu->i_start && !p_spu->b_ephemer )