summaryrefslogtreecommitdiff
path: root/libavcodec
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:45 -0300
commit0045c6dd5cc50adbcb0039924b0ac5b55da0fdeb (patch)
tree7dd5828e4640733b34a135bb51f6d698a6fd6e4b /libavcodec
parentcf512325cb3105a63c797fc7acadb479eb313d1a (diff)
truespeech: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/truespeech.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index a65ced15d7..30a7e86a75 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -64,12 +64,13 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx)
{
TSContext *c = avctx->priv_data;
- if (avctx->channels != 1) {
- avpriv_request_sample(avctx, "Channel count %d", avctx->channels);
+ if (avctx->ch_layout.nb_channels != 1) {
+ avpriv_request_sample(avctx, "Channel count %d", avctx->ch_layout.nb_channels);
return AVERROR_PATCHWELCOME;
}
- 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;
ff_bswapdsp_init(&c->bdsp);