aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aac_ac3_parser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-05-07 07:20:32 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:39 -0300
commit494760f971a41851630d7940abe914cd1115737e (patch)
tree33e017519b761fc8e6776fdc15b5fca627d02f68 /libavcodec/aac_ac3_parser.c
parent2350a50bed6bd71c67947604f117a4dff73ebe35 (diff)
downloadffmpeg-494760f971a41851630d7940abe914cd1115737e.tar.gz
aac: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/aac_ac3_parser.c')
-rw-r--r--libavcodec/aac_ac3_parser.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index e84d30aea2..cd54a0a3e2 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -90,8 +90,13 @@ get_next:
if (avctx->codec_id != AV_CODEC_ID_AAC) {
avctx->sample_rate = s->sample_rate;
if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
- avctx->channels = s->channels;
- avctx->channel_layout = s->channel_layout;
+ av_channel_layout_uninit(&avctx->ch_layout);
+ if (s->channel_layout) {
+ av_channel_layout_from_mask(&avctx->ch_layout, s->channel_layout);
+ } else {
+ avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
+ avctx->ch_layout.nb_channels = s->channels;
+ }
}
s1->duration = s->samples;
avctx->audio_service_type = s->service_type;