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

Diego Biurrun diego
Mon Dec 26 17:09:08 CET 2005


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?

Diego





More information about the ffmpeg-devel mailing list