Commit c21e1492 authored by Anton Khirnov's avatar Anton Khirnov Committed by James Almer

g722: convert to new channel layout API

Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 5e257c1f
......@@ -59,8 +59,8 @@ static av_cold int g722_decode_init(AVCodecContext * avctx)
{
G722Context *c = avctx->priv_data;
avctx->channels = 1;
avctx->channel_layout = AV_CH_LAYOUT_MONO;
av_channel_layout_uninit(&avctx->ch_layout);
avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
c->band[0].scale_factor = 8;
......
......@@ -381,6 +381,11 @@ const AVCodec ff_adpcm_g722_encoder = {
.close = g722_encode_close,
.encode2 = g722_encode_frame,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
#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 | FF_CODEC_CAP_INIT_CLEANUP,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment