CUETools 2.1.1

* Local Database for verification results and metadata
* FlaCuda replaced with FLACCL
This commit is contained in:
chudov
2011-03-08 15:37:43 +00:00
parent 51639e3c7b
commit 052cb096c4
65 changed files with 2839 additions and 1037 deletions

View File

@@ -253,6 +253,15 @@ void CUnBitArray::FlushState(UNBIT_ARRAY_STATE & BitArrayState)
void CUnBitArray::FlushBitArray()
{
// G.S.C.: Fixing a bug here. There was no check here for the buffer boundary.
// nMod is how much we will skip in AdvanceToByteBoundary + ignoring the first byte.
int nMod = m_nCurrentBitIndex % 8;
if (nMod != 0) { nMod = 8 - nMod; }
nMod += 8;
if ((m_nCurrentBitIndex + nMod) >= m_nBits)
FillBitArray();
// G.S.C.: end
AdvanceToByteBoundary();
m_nCurrentBitIndex += 8; // ignore the first byte... (slows compression too much to not output this dummy byte)
m_RangeCoderInfo.buffer = GetC();