[vlc-commits] auhal: simplify memset in callbacks

David Fuhrmann git at videolan.org
Tue Dec 31 11:16:12 CET 2013


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Tue Dec 31 11:15:17 2013 +0100| [31421aef119222ec640f64320ccc103f062567a8] | committer: David Fuhrmann

auhal: simplify memset in callbacks

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

 modules/audio_output/auhal.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index c421fe6..dcb59f3 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -1443,7 +1443,7 @@ static OSStatus RenderCallbackAnalog(vlc_object_t *p_obj,
     /* check if we have enough data */
     if (!availableBytes || p_sys->b_paused) {
         /* return an empty buffer so silence is played until we have data */
-        memset(targetBuffer, 0, ioData->mBuffers[0].mDataByteSize);
+        memset(targetBuffer, 0, bytesRequested);
     } else {
         int32_t bytesToCopy = __MIN(bytesRequested, availableBytes);
 
@@ -1491,7 +1491,7 @@ static OSStatus RenderCallbackSPDIF(AudioDeviceID inDevice,
     /* check if we have enough data */
     if (!availableBytes || p_sys->b_paused) {
         /* return an empty buffer so silence is played until we have data */
-        memset(targetBuffer, 0, outOutputData->mBuffers[p_sys->i_stream_index].mDataByteSize);
+        memset(targetBuffer, 0, bytesRequested);
     } else {
         int32_t bytesToCopy = __MIN(bytesRequested, availableBytes);
 



More information about the vlc-commits mailing list