From fde09eb6eb68995f78717d827552286ec26a0709 Mon Sep 17 00:00:00 2001 From: edisongz <827084985@qq.com> Date: Wed, 26 Jul 2017 15:04:02 +0800 Subject: [PATCH] memset(dest, val, len) --- LFLiveKit/coder/LFHardwareAudioEncoder.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LFLiveKit/coder/LFHardwareAudioEncoder.m b/LFLiveKit/coder/LFHardwareAudioEncoder.m index 64f97225..dd5eee16 100755 --- a/LFLiveKit/coder/LFHardwareAudioEncoder.m +++ b/LFLiveKit/coder/LFHardwareAudioEncoder.m @@ -67,7 +67,8 @@ - (void)encodeAudioData:(nullable NSData*)audioData timeStamp:(uint64_t)timeStam char *totalBuf = malloc(totalSize); char *p = totalBuf; - memset(totalBuf, (int)totalSize, 0); +// memset(totalBuf, (int)totalSize, 0); + memset(totalBuf, 0, (int)totalSize); memcpy(totalBuf, leftBuf, leftLength); memcpy(totalBuf + leftLength, audioData.bytes, audioData.length);