History

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

Fixes #7372

Piotr Uracz committed 5 years ago

Commit 7ceceee1 parent ad2cc0e1 file · +2 −2Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/aac_ac3_parser.c+2−2
@@ -89,7 +89,7 @@ get_next: · 88 unmodified lines
89 the frame). */89 the frame). */
90 if (avctx->codec_id != AV_CODEC_ID_AAC) {90 if (avctx->codec_id != AV_CODEC_ID_AAC) {
91 avctx->sample_rate = s->sample_rate;91 avctx->sample_rate = s->sample_rate;
92 if (avctx->codec_id != AV_CODEC_ID_EAC3) {92 if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
93 avctx->channels = s->channels;93 avctx->channels = s->channels;
94 avctx->channel_layout = s->channel_layout;94 avctx->channel_layout = s->channel_layout;
95 }95 }
@@ -99,7 +99,7 @@ get_next: · 3 unmodified lines
99 99
100 /* Calculate the average bit rate */100 /* Calculate the average bit rate */
101 s->frame_number++;101 s->frame_number++;
102 if (avctx->codec_id != AV_CODEC_ID_EAC3) {102 if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
103 avctx->bit_rate +=103 avctx->bit_rate +=
104 (s->bit_rate - avctx->bit_rate) / s->frame_number;104 (s->bit_rate - avctx->bit_rate) / s->frame_number;
105 }105 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t