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

Reimar Döffinger Reimar.Doeffinger
Mon Dec 26 19:35:59 CET 2005


Hi,
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 :-)





More information about the ffmpeg-devel mailing list