[vlc-commits] mpeg_audio: don't send invalid data on drain

Thomas Guillem git at videolan.org
Wed Sep 16 18:27:26 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 16 18:22:18 2015 +0200| [cd611eebd37662b998045e5a694ff3df4c4c653d] | committer: Thomas Guillem

mpeg_audio: don't send invalid data on drain

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

 modules/codec/mpeg_audio.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c
index 762ac3c..e1e5239 100644
--- a/modules/codec/mpeg_audio.c
+++ b/modules/codec/mpeg_audio.c
@@ -225,8 +225,10 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         }
 
         block_BytestreamPush( &p_sys->bytestream, p_block );
-    } else
+    } else if (p_sys->i_frame_size)
         p_sys->i_state = STATE_SEND_DATA; /* return all the data we have left */
+    else
+        return NULL;
 
     while( 1 )
     {



More information about the vlc-commits mailing list