[matroska-devel] Bug in lacing fixed

Cyrius suiryc at yahoo.com
Tue Apr 15 22:15:29 CEST 2003


I just spotted a bug in the lacing code of
Here is the culprit : (KaxBlock.cpp, RenderData
function, line 224; this is where frame sizes are
written in the file)

// set the size of each member in the lace
tmpValue = 0xFF;
for (i=0; i<myBuffers.size()-1; i++) {
	uint16 tmpSize = myBuffers[i]->Size();
	while (tmpSize >= 0xFF) {
		output.writeFully(&tmpValue, 1);
		tmpSize -= 0xFF;
	tmpValue = tmpSize;
	output.writeFully(&tmpValue, 1);

The problem : tmpValue should be set to 0xFF inside
the for loop.
I corrected that and commited the fix.

As far as I could see the reading part of the code works.

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo

More information about the Matroska-devel mailing list