[FFmpeg-devel] Invalid block align in wmav2 encoder

Sebastien Cote sebas642
Wed Aug 6 00:24:08 CEST 2008


I am encoding using FFMPEG's wmav2 audio codec and I think there is an error when calculating the block align value.

In wmaenc.c the block align is defined as:

avctx->block_align= s->block_align= avctx->bit_rate*(int64_t)s->frame_len / (avctx->sample_rate*8);

If the sampling rate is 44100 and I am encoding at 64kbps, I get 64000*2048 / (44100 * 8) = 371.5

Shouldn't this value be rounded up to the nearest integer instead of being rounded down?



Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com

More information about the ffmpeg-devel mailing list