aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-13 11:11:26 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:33 -0300
commitef65e450d241b1a72b3b137fe50c920fa651b621 (patch)
treec9dfcc357a926f84b9b10402a4a549c759085704
parentc94220e96de28152ca4fb1df549efe0edb001204 (diff)
downloadffmpeg-ef65e450d241b1a72b3b137fe50c920fa651b621.tar.gz
ircam: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavformat/ircamdec.c7
-rw-r--r--libavformat/ircamenc.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/ircamdec.c b/libavformat/ircamdec.c
index a05ca5c9c7..eb59c95e14 100644
--- a/libavformat/ircamdec.c
+++ b/libavformat/ircamdec.c
@@ -87,8 +87,8 @@ static int ircam_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codecpar->channels = channels;
- if (st->codecpar->channels > FF_SANE_NB_CHANNELS)
+ st->codecpar->ch_layout.nb_channels = channels;
+ if (st->codecpar->ch_layout.nb_channels > FF_SANE_NB_CHANNELS)
return AVERROR(ENOSYS);
st->codecpar->sample_rate = sample_rate;
@@ -99,7 +99,8 @@ static int ircam_read_header(AVFormatContext *s)
}
st->codecpar->bits_per_coded_sample = av_get_bits_per_sample(st->codecpar->codec_id);
- st->codecpar->block_align = st->codecpar->bits_per_coded_sample * st->codecpar->channels / 8;
+ st->codecpar->block_align = st->codecpar->bits_per_coded_sample *
+ st->codecpar->ch_layout.nb_channels / 8;
avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
avio_skip(s->pb, 1008);
diff --git a/libavformat/ircamenc.c b/libavformat/ircamenc.c
index d49a427b25..df1494b2b8 100644
--- a/libavformat/ircamenc.c
+++ b/libavformat/ircamenc.c
@@ -44,7 +44,7 @@ static int ircam_write_header(AVFormatContext *s)
avio_wl32(s->pb, 0x0001A364);
avio_wl32(s->pb, av_q2intfloat((AVRational){par->sample_rate, 1}));
- avio_wl32(s->pb, par->channels);
+ avio_wl32(s->pb, par->ch_layout.nb_channels);
avio_wl32(s->pb, tag);
ffio_fill(s->pb, 0, 1008);
return 0;