- if (avctx->codec_id != AV_CODEC_ID_EAC3) {
- avctx->bit_rate =
- (s->last_bit_rate * (s->frame_number -1) + s->bit_rate)/s->frame_number;
- s->last_bit_rate = avctx->bit_rate;
+ if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
+ avctx->bit_rate +=
+ (s->bit_rate - avctx->bit_rate) / s->frame_number;