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:29 -0300
commitf696343d13b149b25dba0b76d329560da208e905 (patch)
treee38bd6ba8ad70b3e94d5404ed0f9b79f42f48809
parentee9c142c2eb8af85f69fc9d74e7d2f90769597db (diff)
downloadffmpeg-f696343d13b149b25dba0b76d329560da208e905.tar.gz
acm: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavformat/acm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/acm.c b/libavformat/acm.c
index 0ee9114f70..c88152d525 100644
--- a/libavformat/acm.c
+++ b/libavformat/acm.c
@@ -48,12 +48,12 @@ static int acm_read_header(AVFormatContext *s)
if (ret < 0)
return ret;
- st->codecpar->channels = AV_RL16(st->codecpar->extradata + 8);
+ st->codecpar->ch_layout.nb_channels = AV_RL16(st->codecpar->extradata + 8);
st->codecpar->sample_rate = AV_RL16(st->codecpar->extradata + 10);
- if (st->codecpar->channels <= 0 || st->codecpar->sample_rate <= 0)
+ if (st->codecpar->ch_layout.nb_channels <= 0 || st->codecpar->sample_rate <= 0)
return AVERROR_INVALIDDATA;
st->start_time = 0;
- st->duration = AV_RL32(st->codecpar->extradata + 4) / st->codecpar->channels;
+ st->duration = AV_RL32(st->codecpar->extradata + 4) / st->codecpar->ch_layout.nb_channels;
ffstream(st)->need_parsing = AVSTREAM_PARSE_FULL_RAW;
avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);