- fixed possible buffer overrun inside WASAPI for Output poll-driven mode according ticket #196 (thanks to Ross Bencina for spotting this and proposing the solution)
This commit is contained in:
dmitrykos 2012-02-16 15:02:08 +00:00
commit 341eb04550

View file

@ -4799,13 +4799,15 @@ PA_THREAD_FUNC ProcThreadPoll(void *param)
// output
if (stream->bufferMode == paUtilFixedHostBufferSize)
{
if (frames >= stream->out.framesPerBuffer)
while (frames >= stream->out.framesPerBuffer)
{
if ((hr = ProcessOutputBuffer(stream, processor, stream->out.framesPerBuffer)) != S_OK)
{
LogHostError(hr);
goto thread_error;
}
frames -= stream->out.framesPerBuffer;
}
}
else