Browse Source

avcodec/aac_ac3_parser: fix channel information parsing in case decoder is disabled

Fixes #7372
tags/n4.4
Piotr Uracz Paul B Mahol 5 years ago
parent
commit
7ceceee8b6
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/aac_ac3_parser.c

+ 2
- 2
libavcodec/aac_ac3_parser.c View File

@@ -89,7 +89,7 @@ get_next:
the frame). */
if (avctx->codec_id != AV_CODEC_ID_AAC) {
avctx->sample_rate = s->sample_rate;
if (avctx->codec_id != AV_CODEC_ID_EAC3) {
if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
avctx->channels = s->channels;
avctx->channel_layout = s->channel_layout;
}
@@ -99,7 +99,7 @@ get_next:

/* Calculate the average bit rate */
s->frame_number++;
if (avctx->codec_id != AV_CODEC_ID_EAC3) {
if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
avctx->bit_rate +=
(s->bit_rate - avctx->bit_rate) / s->frame_number;
}


Loading…
Cancel
Save