summaryrefslogtreecommitdiff
path: root/libavcodec/aac_ac3_parser.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-03-29 14:01:56 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:39 -0300
commit111ed1b16b5a5eb583da6fd4accb0b325aeb355c (patch)
tree5180943a48eb6e443c9be771593bcff1576b8fcd /libavcodec/aac_ac3_parser.c
parent494760f971a41851630d7940abe914cd1115737e (diff)
downloadffmpeg-111ed1b16b5a5eb583da6fd4accb0b325aeb355c.tar.gz
ac3: 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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index cd54a0a3e2..4ce7a73972 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -97,6 +97,12 @@ get_next:
avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
avctx->ch_layout.nb_channels = s->channels;
}
+#if FF_API_OLD_CHANNEL_LAYOUT
+FF_DISABLE_DEPRECATION_WARNINGS
+ avctx->channels = avctx->ch_layout.nb_channels;
+ avctx->channel_layout = s->channel_layout;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
}
s1->duration = s->samples;
avctx->audio_service_type = s->service_type;