summaryrefslogtreecommitdiff
path: root/libavcodec/aac_ac3_parser.c
diff options
context:
space:
mode:
authorPiotr Uracz <puracz@vewd.com>2021-01-25 12:04:36 +0100
committerPaul B Mahol <onemda@gmail.com>2021-02-01 18:02:11 +0100
commit7ceceee8b6ceed2f5a1d53cde1afefad531b5a78 (patch)
tree032b9f6c34bfdd4e9752ace3050cc74c2172501a /libavcodec/aac_ac3_parser.c
parentad2cc0e2f41f3be59e8c7c1a0ab5c813d7073643 (diff)
downloadffmpeg-7ceceee8b6ceed2f5a1d53cde1afefad531b5a78.tar.gz
avcodec/aac_ac3_parser: fix channel information parsing in case decoder is disabled
Fixes #7372
Diffstat (limited to 'libavcodec/aac_ac3_parser.c')
-rw-r--r--libavcodec/aac_ac3_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index e5d4b53339..e84d30aea2 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -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;
}