aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aptxdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-01-29 17:39:13 +0100
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:40 -0300
commit18f61d19c22d8a7557d808b58dbde02c8a5272aa (patch)
treec97157cf93e8b797ffe2abf423f11182dad9c049 /libavcodec/aptxdec.c
parenta4a73c6a9c2007dbea55519482499c7b7462ac9b (diff)
downloadffmpeg-18f61d19c22d8a7557d808b58dbde02c8a5272aa.tar.gz
aptx: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/aptxdec.c')
-rw-r--r--libavcodec/aptxdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/aptxdec.c b/libavcodec/aptxdec.c
index bdcc076c41..1d862e8e6b 100644
--- a/libavcodec/aptxdec.c
+++ b/libavcodec/aptxdec.c
@@ -146,7 +146,7 @@ static int aptx_decode_frame(AVCodecContext *avctx, void *data,
}
/* get output buffer */
- frame->channels = NB_CHANNELS;
+ frame->ch_layout.nb_channels = NB_CHANNELS;
frame->format = AV_SAMPLE_FMT_S32P;
frame->nb_samples = 4 * avpkt->size / s->block_size;
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
@@ -181,7 +181,10 @@ const AVCodec ff_aptx_decoder = {
.decode = aptx_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
+#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
+#endif
+ .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE },
};
@@ -198,7 +201,10 @@ const AVCodec ff_aptx_hd_decoder = {
.decode = aptx_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
+#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
+#endif
+ .ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
AV_SAMPLE_FMT_NONE },
};