diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-01-29 17:24:40 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:35 -0300 |
commit | 80005b681e27b99445b50f9051f356fa577eadf2 (patch) | |
tree | 12d791d70089c41357e4ed2faa28df9fe7b59582 /libavformat/nistspheredec.c | |
parent | 29e61ef5d68b297dcf79244ac746ad8b650e34eb (diff) | |
download | ffmpeg-80005b681e27b99445b50f9051f356fa577eadf2.tar.gz |
nistspheredec: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/nistspheredec.c')
-rw-r--r-- | libavformat/nistspheredec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c index b606ce72aa..85aa5e2cbf 100644 --- a/libavformat/nistspheredec.c +++ b/libavformat/nistspheredec.c @@ -80,7 +80,8 @@ static int nist_read_header(AVFormatContext *s) avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); - 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; if (avio_tell(s->pb) > header_size) return AVERROR_INVALIDDATA; @@ -89,8 +90,8 @@ static int nist_read_header(AVFormatContext *s) return 0; } else if (!memcmp(buffer, "channel_count", 13)) { - sscanf(buffer, "%*s %*s %u", &st->codecpar->channels); - if (st->codecpar->channels <= 0 || st->codecpar->channels > INT16_MAX) + sscanf(buffer, "%*s %*s %u", &st->codecpar->ch_layout.nb_channels); + if (st->codecpar->ch_layout.nb_channels <= 0 || st->codecpar->ch_layout.nb_channels > INT16_MAX) return AVERROR_INVALIDDATA; } else if (!memcmp(buffer, "sample_byte_format", 18)) { sscanf(buffer, "%*s %*s %31s", format); |