]> git.sesse.net Git - vlc/commitdiff
* Allow "empty" subtitle packets. These are used to "wipe" ephemer subtitles of the...
authorDerk-Jan Hartman <hartman@videolan.org>
Mon, 13 Nov 2006 21:58:38 +0000 (21:58 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Mon, 13 Nov 2006 21:58:38 +0000 (21:58 +0000)
  Used by mp4 and 3gpp Timed Text

modules/codec/subsdec.c

index bc26ac3f074b292a47adc7bf206f21b341d15221..05fc3c1f927f1b4c50b7a4b8d2eb97c1367b35ae 100644 (file)
@@ -316,9 +316,11 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
     }
 
     /* Check validity of packet data */
-    if( p_block->i_buffer <= 1 || p_block->p_buffer[0] == '\0' )
+    /* An "empty" line containing only \0 can be used to force
+       and ephemer picture from the screen */
+    if( p_block->i_buffer < 1 )
     {
-        msg_Warn( p_dec, "empty subtitle" );
+        msg_Warn( p_dec, "no subtitle data" );
         return NULL;
     }