[Top][All Lists]

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

Re: [Gnash-dev] Build problem on OS/2

From: David Rorex
Subject: Re: [Gnash-dev] Build problem on OS/2
Date: Thu, 9 Aug 2007 08:07:12 -0700

On 8/8/07, strk <address@hidden> wrote:
On Thu, Aug 09, 2007 at 05:47:28AM +0200, strk wrote:
> On Wed, Aug 08, 2007 at 06:03:37PM -0700, David Rorex wrote:
> > On 8/8/07, Paul Smedley <address@hidden> wrote:
> > Why is it even calling ceil on an int in the first place? I think you should
> > be able to simply do: (regardless of platform)
> >
> >         in->ensureBytes( sample_count * ( 3 + n_bits/8 );
> It's not calling ceil on an int, but on the result of a division.
> We want to get 1 if n_bits is 6 ...
> ceil(n_bits/8)

I committed a patch fixing a bug in that function.
The new code still contains the ceil call, Paul, try adding a final .0
to the constant in the division (4096.0 and 8.0) in case it fails the
way it is.


Yeah, I was going to say that, if n_bits is an int, and 8 is an int, then the result will also be an int (as if floor had been called on it). adding the .0 will force floating point division.

reply via email to

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