summaryrefslogtreecommitdiff
path: root/libavcodec/dfpwmenc.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-03-10 10:57:39 -0300
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:41 -0300
commit441fe2508da82b1824d71d5b62059c17262eb76d (patch)
treee1b31bc998895c0bcd76b7b7ade687044eb2e7e8 /libavcodec/dfpwmenc.c
parentb2af4bc807cfc62d61213c6050aac26ec8a1e675 (diff)
dfpw: convert to new channel layout API
Diffstat (limited to 'libavcodec/dfpwmenc.c')
-rw-r--r--libavcodec/dfpwmenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dfpwmenc.c b/libavcodec/dfpwmenc.c
index 02f2e647d2..8efd23e094 100644
--- a/libavcodec/dfpwmenc.c
+++ b/libavcodec/dfpwmenc.c
@@ -93,7 +93,7 @@ static int dfpwm_enc_frame(struct AVCodecContext *ctx, struct AVPacket *packet,
const struct AVFrame *frame, int *got_packet)
{
DFPWMState *state = ctx->priv_data;
- int size = frame->nb_samples * frame->channels / 8 + (frame->nb_samples % 8 > 0 ? 1 : 0);
+ int size = frame->nb_samples * frame->ch_layout.nb_channels / 8 + (frame->nb_samples % 8 > 0 ? 1 : 0);
int ret = ff_get_encode_buffer(ctx, packet, size, 0);
if (ret) {