Hi, I wonder why nobody replies, but that might be my fault. The code with the division by zero is in line 370 in revision 14659 and line 347 in current revision. BTW why are there two means to get the bits per sample av_get_bits_per_sample(avctx->codec_id) and avctx->bits_per_sample for an audio stream? Are there reasons? Regards Lars