vlc | branch: master | Thomas Guillem <[email protected]> | Wed Sep 21 16:45:33 
2016 +0200| [a70366e67fdbfa9d254bb675fc662184bf793f7c] | committer: Thomas 
Guillem

decoder: assert if aout format is not prepared

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

 src/input/decoder.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 98f5211..62f7bde 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -594,6 +594,9 @@ static int DecoderGetDisplayRate( decoder_t *p_dec )
  *****************************************************************************/
 block_t *decoder_NewAudioBuffer( decoder_t *dec, int samples )
 {
+    assert( dec->fmt_out.audio.i_frame_length > 0
+         && dec->fmt_out.audio.i_bytes_per_frame  > 0 );
+
     size_t length = samples * dec->fmt_out.audio.i_bytes_per_frame
                             / dec->fmt_out.audio.i_frame_length;
     block_t *block = block_Alloc( length );

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to