aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-03-31 18:51:13 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:38 -0300
commitba36f3fd7942b74067b8154a59a0beaaaadd75a9 (patch)
tree047fab328441f4247639cf7abc62df27ff4b4e74
parent8eda3c7f91e1a5b3917ef87ea3249968d5a9f263 (diff)
downloadffmpeg-ba36f3fd7942b74067b8154a59a0beaaaadd75a9.tar.gz
vqf: 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>
-rw-r--r--libavformat/vqf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index 76131cdc55..1671d03b2c 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -136,12 +136,12 @@ static int vqf_read_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
avio_read(s->pb, comm_chunk, 12);
- st->codecpar->channels = AV_RB32(comm_chunk ) + 1;
+ st->codecpar->ch_layout.nb_channels = AV_RB32(comm_chunk) + 1;
read_bitrate = AV_RB32(comm_chunk + 4);
rate_flag = AV_RB32(comm_chunk + 8);
avio_skip(s->pb, len-12);
- if (st->codecpar->channels <= 0) {
+ if (st->codecpar->ch_layout.nb_channels <= 0) {
av_log(s, AV_LOG_ERROR, "Invalid number of channels\n");
return AVERROR_INVALIDDATA;
}
@@ -192,15 +192,15 @@ static int vqf_read_header(AVFormatContext *s)
break;
}
- if (read_bitrate / st->codecpar->channels < 8 ||
- read_bitrate / st->codecpar->channels > 48) {
+ if (read_bitrate / st->codecpar->ch_layout.nb_channels < 8 ||
+ read_bitrate / st->codecpar->ch_layout.nb_channels > 48) {
av_log(s, AV_LOG_ERROR, "Invalid bitrate per channel %d\n",
- read_bitrate / st->codecpar->channels);
+ read_bitrate / st->codecpar->ch_layout.nb_channels);
return AVERROR_INVALIDDATA;
}
switch (((st->codecpar->sample_rate/1000) << 8) +
- read_bitrate/st->codecpar->channels) {
+ read_bitrate/st->codecpar->ch_layout.nb_channels) {
case (11<<8) + 8 :
case (8 <<8) + 8 :
case (11<<8) + 10: