Skip to content

Commit

Permalink
ActiveAE: check for sink errors, WASAPI returns INT_MAX on error
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Sep 28, 2013
1 parent fdadf33 commit 9c27a02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
Expand Up @@ -756,6 +756,13 @@ unsigned int CActiveAESink::OutputSamples(CSampleBuffer* samples)
else
continue;
}
else if (written > maxFrames)
{
m_extError = true;
CLog::Log(LOGERROR, "CActiveAESink::OutputSamples - sink returned error");
m_stats->UpdateSinkDelay(0, samples->pool ? maxFrames : 0);
return 0;
}
frames -= written;
buffer += written*m_sinkFormat.m_frameSize;
sinkDelay = m_sink->GetDelay();
Expand Down

0 comments on commit 9c27a02

Please sign in to comment.