[vlc-devel] commit: Do not dump corrupted blocks in "dump" codec. (Laurent Aimar )

git version control git at videolan.org
Thu Apr 30 22:19:23 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Apr 29 20:42:13 2009 +0200| [59d7d4f246f9ed4125734fa108a06dcd0a23c1a1] | committer: Laurent Aimar 

Do not dump corrupted blocks in "dump" codec.

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

 modules/misc/dummy/decoder.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/misc/dummy/decoder.c b/modules/misc/dummy/decoder.c
index 06b1644..ad1abaa 100644
--- a/modules/misc/dummy/decoder.c
+++ b/modules/misc/dummy/decoder.c
@@ -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 );




More information about the vlc-devel mailing list