[vlc-commits] audioqueue: fix buffer leak (close #8140)

Felix Paul Kühne git at videolan.org
Fri Feb 8 10:52:01 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Feb  8 10:40:51 2013 +0100| [c1ec4dee751ae64e852aeba16c2322b35ddd8ac6] | committer: Felix Paul Kühne

audioqueue: fix buffer leak (close #8140)

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

 modules/audio_output/audioqueue.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/audio_output/audioqueue.c b/modules/audio_output/audioqueue.c
index 9db0e3d..17eb022 100644
--- a/modules/audio_output/audioqueue.c
+++ b/modules/audio_output/audioqueue.c
@@ -214,10 +214,9 @@ static void Play(audio_output_t *p_aout, block_t *p_block)
 
 void UnusedAudioQueueCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) {
     /* this function does nothing, but needs to be here to make the AudioQueue API happy.
-     * without a callback, it will refuse to create an AudioQueue instance. */
+     * additionally, we clean-up after empty buffers */
     VLC_UNUSED(inUserData);
-    VLC_UNUSED(inAQ);
-    VLC_UNUSED(inBuffer);
+    AudioQueueFreeBuffer(inAQ, inBuffer);
 }
 
 static void Pause(audio_output_t *p_aout, bool pause, mtime_t date)



More information about the vlc-commits mailing list