diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 13:27:47 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:30 -0300 |
commit | 0ecd7106d7393adda82dee4944915572638b6483 (patch) | |
tree | 5d27f79f0c59d0addb5f7167fb8ee78944b84bf5 /libavformat/aiffenc.c | |
parent | 14bbc23b683a36d5f6b28bee2c003ef6fbc64afc (diff) | |
download | ffmpeg-0ecd7106d7393adda82dee4944915572638b6483.tar.gz |
aiff: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/aiffenc.c')
-rw-r--r-- | libavformat/aiffenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c index 1fd6b8a70b..bdaf5c2c3e 100644 --- a/libavformat/aiffenc.c +++ b/libavformat/aiffenc.c @@ -144,10 +144,10 @@ static int aiff_write_header(AVFormatContext *s) avio_wb32(pb, 0xA2805140); } - if (par->channels > 2 && par->channel_layout) { + if (par->ch_layout.order == AV_CHANNEL_ORDER_NATIVE && par->ch_layout.nb_channels > 2) { ffio_wfourcc(pb, "CHAN"); avio_wb32(pb, 12); - ff_mov_write_chan(pb, par->channel_layout); + ff_mov_write_chan(pb, par->ch_layout.u.mask); } put_meta(s, "title", MKTAG('N', 'A', 'M', 'E')); @@ -158,7 +158,7 @@ static int aiff_write_header(AVFormatContext *s) /* Common chunk */ ffio_wfourcc(pb, "COMM"); avio_wb32(pb, aifc ? 24 : 18); /* size */ - avio_wb16(pb, par->channels); /* Number of channels */ + avio_wb16(pb, par->ch_layout.nb_channels); /* Number of channels */ aiff->frames = avio_tell(pb); avio_wb32(pb, 0); /* Number of frames */ @@ -170,7 +170,7 @@ static int aiff_write_header(AVFormatContext *s) return AVERROR(EINVAL); } if (!par->block_align) - par->block_align = (par->bits_per_coded_sample * par->channels) >> 3; + par->block_align = (par->bits_per_coded_sample * par->ch_layout.nb_channels) >> 3; avio_wb16(pb, par->bits_per_coded_sample); /* Sample size */ |