mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-29 10:52:20 +00:00
g722: 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>
This commit is contained in:
parent
5e257c1f7b
commit
c21e1492e3
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user