[Ffmpeg-devel] wma v2 decoding - attempt at fixing

Diego Biurrun diego
Tue Dec 27 20:58:06 CET 2005


On Mon, Dec 26, 2005 at 07:35:59PM +0100, Reimar D?ffinger wrote:
> On Mon, Dec 26, 2005 at 05:09:08PM +0100, Diego Biurrun wrote:
> > On Mon, Dec 26, 2005 at 02:49:33PM +0100, Reimar D?ffinger wrote:
> > > On Mon, Dec 26, 2005 at 02:25:47PM +0100, Roberto Togni wrote:
> > > 
> > > >      bps = (float)s->bit_rate / (float)(s->nb_channels * s->sample_rate);
> > > > -    s->byte_offset_bits = av_log2((int)(bps * s->frame_len / 8.0)) + 2;
> > > > +    s->byte_offset_bits = av_log2((int)((bps * s->frame_len / 8.0) + 0.5)) + 2;
> > > 
> > > I guess you could get rid of that extra pair of parenthisis I guess,
> > > after all gcc already knows the */ before +- rule :-)
> > 
> > Umm, won't that change the semantics since the 0.5 would be added after
> > the cast to int?
> 
> That's why I meant the other pair of parenthisis :-)

Doh, I'm seeing clearly now...

Diego





More information about the ffmpeg-devel mailing list