[matroska-devel] Bug in lacing fixed

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


Hi

I just spotted a bug in the lacing code of
libmatroska.
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);
		Size++;
		tmpSize -= 0xFF;
	}
	tmpValue = tmpSize;
	output.writeFully(&tmpValue, 1);
	Size++;
}

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
http://search.yahoo.com
http://www.matroska.org



More information about the Matroska-devel mailing list