mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
truespeech: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
cf512325cb
commit
0045c6dd5c
@ -64,12 +64,13 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx)
|
|||||||
{
|
{
|
||||||
TSContext *c = avctx->priv_data;
|
TSContext *c = avctx->priv_data;
|
||||||
|
|
||||||
if (avctx->channels != 1) {
|
if (avctx->ch_layout.nb_channels != 1) {
|
||||||
avpriv_request_sample(avctx, "Channel count %d", avctx->channels);
|
avpriv_request_sample(avctx, "Channel count %d", avctx->ch_layout.nb_channels);
|
||||||
return AVERROR_PATCHWELCOME;
|
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;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
|
|
||||||
ff_bswapdsp_init(&c->bdsp);
|
ff_bswapdsp_init(&c->bdsp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user