aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/opusdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-28 14:38:10 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:44 -0300
commitcc37640a72a96c2674d8ee93fe3b766405a027c4 (patch)
tree61bddfa0ee0a18faa99a8f2619e6247158877628 /libavcodec/opusdec.c
parent045d6b9abfd8f44e4cedab65ec794267b186eba9 (diff)
downloadffmpeg-cc37640a72a96c2674d8ee93fe3b766405a027c4.tar.gz
opus: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/opusdec.c')
-rw-r--r--libavcodec/opusdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index b063e0efeb..2133a4c63b 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -458,7 +458,7 @@ static int opus_decode_packet(AVCodecContext *avctx, void *data,
return ret;
frame->nb_samples = 0;
- for (i = 0; i < avctx->channels; i++) {
+ for (i = 0; i < avctx->ch_layout.nb_channels; i++) {
ChannelMap *map = &c->channel_maps[i];
if (!map->copy)
c->streams[map->stream_idx].out[map->channel_idx] = (float*)frame->extended_data[i];
@@ -541,7 +541,7 @@ static int opus_decode_packet(AVCodecContext *avctx, void *data,
}
}
- for (i = 0; i < avctx->channels; i++) {
+ for (i = 0; i < avctx->ch_layout.nb_channels; i++) {
ChannelMap *map = &c->channel_maps[i];
/* handle copied channels */