]> git.sesse.net Git - vlc/commitdiff
Do not dump corrupted blocks in "dump" codec.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 29 Apr 2009 18:42:13 +0000 (20:42 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 30 Apr 2009 19:01:34 +0000 (21:01 +0200)
modules/misc/dummy/decoder.c

index 06b1644204ac10afe6b1e38a25238c573a99312e..ad1abaa4beaac6c3fee452f3fc9df90c91a49eed 100644 (file)
@@ -144,7 +144,9 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     if( !pp_block || !*pp_block ) return NULL;
     p_block = *pp_block;
 
-    if( p_sys->i_fd >= 0 && p_block->i_buffer )
+    if( p_sys->i_fd >= 0 &&
+        p_block->i_buffer > 0 &&
+        (p_block->i_flags & (BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) ) == 0 )
     {
 #ifndef UNDER_CE
         write( p_sys->i_fd, p_block->p_buffer, p_block->i_buffer );