summaryrefslogtreecommitdiff
path: root/libavcodec/aac_ac3_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/aac_ac3_parser.c')
-rw-r--r--libavcodec/aac_ac3_parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index b51f1769f7..90cbb9535c 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -84,8 +84,10 @@ get_next:
avctx->codec_id == CODEC_ID_EAC3)))) {
avctx->channels = avctx->request_channels;
} else {
+ if (avctx->codec_id != CODEC_ID_AAC || s->channels) {
avctx->channels = s->channels;
avctx->channel_layout = s->channel_layout;
+ }
}
avctx->bit_rate = s->bit_rate;
avctx->frame_size = s->samples;