[vlc-commits] codec: avcodec: fix drain on eos

Francois Cartegnie git at videolan.org
Mon Jun 12 17:38:02 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun 12 17:33:03 2017 +0200| [84c871bb019a5f84070f5ad3d0b609cca2a001ab] | committer: Francois Cartegnie

codec: avcodec: fix drain on eos

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

 modules/codec/avcodec/video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index b42a166013..83eac59838 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -953,7 +953,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error
         post_mt( p_sys );
 
         av_init_packet( &pkt );
-        if( p_block )
+        if( p_block && p_block->i_buffer > 0 )
         {
             pkt.data = p_block->p_buffer;
             pkt.size = p_block->i_buffer;



More information about the vlc-commits mailing list