aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/g729_parser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-29 09:36:27 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:42 -0300
commit64c64cb4517946ba4ed3a7c8cc87847c78e1fbd0 (patch)
tree2fbc102f94928e8507541e966a0799976666d60e /libavcodec/g729_parser.c
parente763a7cf0b656b9bebef7e624363dbe26822b191 (diff)
downloadffmpeg-64c64cb4517946ba4ed3a7c8cc87847c78e1fbd0.tar.gz
g729: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/g729_parser.c')
-rw-r--r--libavcodec/g729_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/g729_parser.c b/libavcodec/g729_parser.c
index 4dcdeab651..d51a78877d 100644
--- a/libavcodec/g729_parser.c
+++ b/libavcodec/g729_parser.c
@@ -49,9 +49,9 @@ static int g729_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
if (avctx->codec_id == AV_CODEC_ID_ACELP_KELVIN)
s->block_size++;
// channels > 2 is invalid, we pass the packet on unchanged
- if (avctx->channels > 2)
+ if (avctx->ch_layout.nb_channels > 2)
s->block_size = 0;
- s->block_size *= avctx->channels;
+ s->block_size *= avctx->ch_layout.nb_channels;
s->duration = avctx->frame_size;
}