gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog libamf/sol.cpp


From: Bastiaan Jacques
Subject: Re: [Gnash-commit] gnash ChangeLog libamf/sol.cpp
Date: Mon, 11 Feb 2008 10:52:52 +0100 (CET)

I don't exactly know. What I do know is that it's what encodeVariable()
returns in its outsize parameter. The element class could probably use a
method like "encodedSize()". At any rate, I increased the size by 2 for
each element, because later in the writeFile method padding zeroes are
written, so the size that actually gets written is encodedSize()+2:

memcpy(ptr, foo, outsize);
ptr += outsize;
*ptr++ = 0;

In the last line, ptr is incremented by one, making the length that was
actually written outsize + 1. Which is less than what we allocated prior
to my patch.

Bastiaan

On Mon, 11 Feb 2008, strk wrote:
+       size += el->getName().size() + el->getLength() + 7;

What are these magic numbers exactly ?

--strk;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]