mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/aac_ac3_parser: fix channel information parsing in case decoder is disabled
Fixes #7372
This commit is contained in:
parent
ad2cc0e2f4
commit
7ceceee8b6
@ -89,7 +89,7 @@ get_next:
|
|||||||
the frame). */
|
the frame). */
|
||||||
if (avctx->codec_id != AV_CODEC_ID_AAC) {
|
if (avctx->codec_id != AV_CODEC_ID_AAC) {
|
||||||
avctx->sample_rate = s->sample_rate;
|
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->channels = s->channels;
|
||||||
avctx->channel_layout = s->channel_layout;
|
avctx->channel_layout = s->channel_layout;
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ get_next:
|
|||||||
|
|
||||||
/* Calculate the average bit rate */
|
/* Calculate the average bit rate */
|
||||||
s->frame_number++;
|
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 +=
|
avctx->bit_rate +=
|
||||||
(s->bit_rate - avctx->bit_rate) / s->frame_number;
|
(s->bit_rate - avctx->bit_rate) / s->frame_number;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user