[vlc-commits] audiounit: fix crash

Felix Paul Kühne git at videolan.org
Mon Dec 2 17:14:50 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Dec  2 17:14:18 2013 +0100| [e426d8e52529904227d19b932b228b6c04c71acf] | committer: Felix Paul Kühne

audiounit: fix crash

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

 modules/audio_output/audiounit_ios.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/audiounit_ios.c b/modules/audio_output/audiounit_ios.c
index 163b9a6..a7d7fa2 100644
--- a/modules/audio_output/audiounit_ios.c
+++ b/modules/audio_output/audiounit_ios.c
@@ -396,7 +396,7 @@ static OSStatus RenderCallback(vlc_object_t *p_obj,
     Float32 *buffer = TPCircularBufferTail(&p_sys->circular_buffer, &availableBytes);
 
     /* check if we have enough data */
-    if (!availableBytes || p_sys->b_paused) {
+    if (!availableBytes || p_sys->b_paused ||!buffer) {
         /* return an empty buffer so silence is played until we have data */
         memset(targetBuffer, 0, ioData->mBuffers[0].mDataByteSize);
     } else {



More information about the vlc-commits mailing list