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

Reimar Döffinger Reimar.Doeffinger
Mon Dec 26 14:49:33 CET 2005


Hi,
On Mon, Dec 26, 2005 at 02:25:47PM +0100, Roberto Togni wrote:
> Please test it with as many files as possible.

Works fine with the files included in Windows XP (only samples I have
*g*).

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

Greetings,
Reimar D?ffinger





More information about the ffmpeg-devel mailing list