summaryrefslogtreecommitdiff
path: root/libavcodec/ra144enc.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:44 -0300
commit513c0e276fe6a6d4ec1787adf77153acaf1219bb (patch)
treefec7698fa7f5b5b6d738477591ea326bec86be7d /libavcodec/ra144enc.c
parent063e5f1fa9a6e44cf8ec52b8f75b888cc6c9724c (diff)
ra144: 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/ra144enc.c')
-rw-r--r--libavcodec/ra144enc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
index 7a96354633..19d46ffe0c 100644
--- a/libavcodec/ra144enc.c
+++ b/libavcodec/ra144enc.c
@@ -51,11 +51,6 @@ static av_cold int ra144_encode_init(AVCodecContext * avctx)
RA144Context *ractx;
int ret;
- if (avctx->channels != 1) {
- av_log(avctx, AV_LOG_ERROR, "invalid number of channels: %d\n",
- avctx->channels);
- return -1;
- }
avctx->frame_size = NBLOCKS * BLOCKSIZE;
avctx->initial_padding = avctx->frame_size;
avctx->bit_rate = 8000;
@@ -554,6 +549,9 @@ const AVCodec ff_ra_144_encoder = {
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.supported_samplerates = (const int[]){ 8000, 0 },
+#if FF_API_OLD_CHANNEL_LAYOUT
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
+#endif
+ .ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};