diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-05-13 11:11:26 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:29 -0300 |
commit | a4630dc0461d621b643a67bc124b6363fa4b5692 (patch) | |
tree | e8622e8c1c05c800a1e4265ce14719a736acf59e /libavformat | |
parent | ced933a394a86cbc35b178c5ab2187ff5283deda (diff) | |
download | ffmpeg-a4630dc0461d621b643a67bc124b6363fa4b5692.tar.gz |
ads: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/ads.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/ads.c b/libavformat/ads.c index e7b419ce8d..c19498490d 100644 --- a/libavformat/ads.c +++ b/libavformat/ads.c @@ -48,11 +48,11 @@ static int ads_read_header(AVFormatContext *s) st->codecpar->sample_rate = avio_rl32(s->pb); if (st->codecpar->sample_rate <= 0) return AVERROR_INVALIDDATA; - st->codecpar->channels = avio_rl32(s->pb); - if (st->codecpar->channels <= 0) + st->codecpar->ch_layout.nb_channels = avio_rl32(s->pb); + if (st->codecpar->ch_layout.nb_channels <= 0) return AVERROR_INVALIDDATA; align = avio_rl32(s->pb); - if (align <= 0 || align > INT_MAX / st->codecpar->channels) + if (align <= 0 || align > INT_MAX / st->codecpar->ch_layout.nb_channels) return AVERROR_INVALIDDATA; if (codec == 1) @@ -60,11 +60,11 @@ static int ads_read_header(AVFormatContext *s) else st->codecpar->codec_id = AV_CODEC_ID_ADPCM_PSX; - st->codecpar->block_align = st->codecpar->channels * align; + st->codecpar->block_align = st->codecpar->ch_layout.nb_channels * align; avio_skip(s->pb, 12); size = avio_rl32(s->pb); if (st->codecpar->codec_id == AV_CODEC_ID_ADPCM_PSX && size >= 0x40) - st->duration = (size - 0x40) / 16 / st->codecpar->channels * 28; + st->duration = (size - 0x40) / 16 / st->codecpar->ch_layout.nb_channels * 28; avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); return 0; |