aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-08-23 22:52:55 -0300
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:29 -0300
commitee9c142c2eb8af85f69fc9d74e7d2f90769597db (patch)
treea03e0f9cfd4962e426e6274ca40a84da4bb44b92 /libavformat
parentbca70e79127f2e6ad0e3e42494c2dbfc2e4f632a (diff)
downloadffmpeg-ee9c142c2eb8af85f69fc9d74e7d2f90769597db.tar.gz
ace: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/acedec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/acedec.c b/libavformat/acedec.c
index a52a0f0e54..6322af31f3 100644
--- a/libavformat/acedec.c
+++ b/libavformat/acedec.c
@@ -74,7 +74,7 @@ static int ace_read_header(AVFormatContext *s)
st->start_time = 0;
par = st->codecpar;
par->codec_type = AVMEDIA_TYPE_AUDIO;
- par->channels = nb_channels;
+ par->ch_layout.nb_channels = nb_channels;
par->sample_rate = rate;
par->block_align = (codec == 4 ? 0x60 : codec == 5 ? 0x98 : 0xC0) * nb_channels;
st->duration = (size / par->block_align) * 1024LL;
@@ -85,7 +85,7 @@ static int ace_read_header(AVFormatContext *s)
return ret;
AV_WL16(st->codecpar->extradata, 1);
- AV_WL16(st->codecpar->extradata+2, 2048 * par->channels);
+ AV_WL16(st->codecpar->extradata+2, 2048 * nb_channels);
AV_WL16(st->codecpar->extradata+4, 0);
AV_WL16(st->codecpar->extradata+6, codec == 4 ? 1 : 0);
AV_WL16(st->codecpar->extradata+8, codec == 4 ? 1 : 0);