summaryrefslogtreecommitdiff
path: root/libavformat/chromaprint.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-01-17 12:23:20 -0300
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:31 -0300
commit3b3b8eb8ef5a92263e17f504009d335b7d2b6361 (patch)
tree62401f419e5f3978baf86e8817518878fbfbd6be /libavformat/chromaprint.c
parent466a9af1f9682c72a98de7427989f5c5da1284fd (diff)
downloadffmpeg-3b3b8eb8ef5a92263e17f504009d335b7d2b6361.tar.gz
chromaprint: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/chromaprint.c')
-rw-r--r--libavformat/chromaprint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
index e4882c8e61..bcb8315159 100644
--- a/libavformat/chromaprint.c
+++ b/libavformat/chromaprint.c
@@ -92,7 +92,7 @@ static int write_header(AVFormatContext *s)
st = s->streams[0];
- if (st->codecpar->channels > 2) {
+ if (st->codecpar->ch_layout.nb_channels > 2) {
av_log(s, AV_LOG_ERROR, "Only up to 2 channels are supported\n");
return AVERROR(EINVAL);
}
@@ -102,7 +102,7 @@ static int write_header(AVFormatContext *s)
return AVERROR(EINVAL);
}
- if (!chromaprint_start(cpr->ctx, st->codecpar->sample_rate, st->codecpar->channels)) {
+ if (!chromaprint_start(cpr->ctx, st->codecpar->sample_rate, st->codecpar->ch_layout.nb_channels)) {
av_log(s, AV_LOG_ERROR, "Failed to start chromaprint\n");
return AVERROR_EXTERNAL;
}