[vlc-devel] [PATCH] Make sure audio blocks always have their length set

Rafaël Carré funman at videolan.org
Tue Dec 25 12:24:06 CET 2012


---
Note, length might be useful for filters as well.
This will require checking all decoders and filters.

 src/audio_output/output.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 7c51cb3..2c34c14 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -29,6 +29,8 @@
 #include <vlc_aout.h>
 #include <vlc_modules.h>
 
+#include <assert.h>
+
 #include "libvlc.h"
 #include "aout_internal.h"
 
@@ -540,6 +542,7 @@ int aout_OutputTimeGet (audio_output_t *aout, mtime_t *delay)
 void aout_OutputPlay (audio_output_t *aout, block_t *block)
 {
     aout_assert_locked (aout);
+    assert(block->i_length);
     aout->play (aout, block);
 }
 
-- 
1.7.10.4



More information about the vlc-devel mailing list