diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-05-29 08:34:13 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:41 -0300 |
commit | 89f9a9061e429f36a4f6f6637ea96763a86343f8 (patch) | |
tree | 4f00832326449d7ed5b3a6c8fd36fab59fbaaaee | |
parent | fbd6e2bab4382a8ccd08f3df54fe38501164a9a0 (diff) | |
download | ffmpeg-89f9a9061e429f36a4f6f6637ea96763a86343f8.tar.gz |
dst: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/dstdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c index 6d0b25f4c3..78427bd15c 100644 --- a/libavcodec/dstdec.c +++ b/libavcodec/dstdec.c @@ -80,8 +80,8 @@ static av_cold int decode_init(AVCodecContext *avctx) DSTContext *s = avctx->priv_data; int i; - if (avctx->channels > DST_MAX_CHANNELS) { - avpriv_request_sample(avctx, "Channel count %d", avctx->channels); + if (avctx->ch_layout.nb_channels > DST_MAX_CHANNELS) { + avpriv_request_sample(avctx, "Channel count %d", avctx->ch_layout.nb_channels); return AVERROR_PATCHWELCOME; } @@ -97,7 +97,7 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->sample_fmt = AV_SAMPLE_FMT_FLT; - for (i = 0; i < avctx->channels; i++) + for (i = 0; i < avctx->ch_layout.nb_channels; i++) memset(s->dsdctx[i].buf, 0x69, sizeof(s->dsdctx[i].buf)); ff_init_dsd_data(); @@ -243,7 +243,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, unsigned map_ch_to_pelem[DST_MAX_CHANNELS]; unsigned i, ch, same_map, dst_x_bit; unsigned half_prob[DST_MAX_CHANNELS]; - const int channels = avctx->channels; + const int channels = avctx->ch_layout.nb_channels; DSTContext *s = avctx->priv_data; GetBitContext *gb = &s->gb; ArithCoder *ac = &s->ac; |