mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
chromaprint: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
466a9af1f9
commit
3b3b8eb8ef
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue