Commit dc9879ba authored by Martin Storsjö's avatar Martin Storsjö Committed by Felix Paul Kühne

audiounit_ios: Fill the remainder of the buffer with zeros

If we didn't have enough data to fill the buffer, fill the rest
of it with zeros. This is better than playing back whatever happened
to be there from before.
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent e720aa79
......@@ -389,6 +389,8 @@ static OSStatus RenderCallback(vlc_object_t *p_obj,
memcpy(targetBuffer, buffer, __MIN(bytesToCopy, availableBytes));
TPCircularBufferConsume(&p_sys->circular_buffer, __MIN(bytesToCopy, availableBytes));
VLC_UNUSED(inNumberFrames);
if (availableBytes < bytesToCopy)
memset((uint8_t*) targetBuffer + availableBytes, 0, bytesToCopy - availableBytes);
}
return noErr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment