[vlc-commits] avcodec/video.c: do not drop good data on discontinuity but only on data corruption.

Jean-Paul Saman git at videolan.org
Tue Oct 13 07:20:59 CEST 2015


vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Sun Sep 20 10:27:43 2015 +0200| [2e5d041ea6cdf46bb1c5b6d1f79b3e91c2493f28] | committer: Ilkka Ollakka

avcodec/video.c: do not drop good data on discontinuity but only on data corruption.

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

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

 modules/codec/avcodec/video.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index a8bb7fa..b67a058 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -522,8 +522,11 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
                 avcodec_flush_buffers( p_context );
             wait_mt( p_sys );
 
-            block_Release( p_block );
-            return NULL;
+            if( p_block->i_flags & BLOCK_FLAG_CORRUPTED )
+            {
+                block_Release( p_block );
+                return NULL;
+            }
         }
 
         if( p_block->i_flags & BLOCK_FLAG_PREROLL )



More information about the vlc-commits mailing list