Multichannel Opus streams require channel mapping information in extradata.
Signed-off-by: James Almer <jamrial@gmail.com>
avio_skip(pb, size - ALAC_NEW_KUKI);
}
} else if (st->codecpar->codec_id == AV_CODEC_ID_OPUS) {
+ // The data layout for Opus is currently unknown, so we do not export
+ // extradata at all. Multichannel streams are not supported.
+ if (st->codecpar->channels > 2) {
+ avpriv_request_sample(s, "multichannel Opus in CAF");
+ return AVERROR_PATCHWELCOME;
+ }
avio_skip(pb, size);
} else {
av_freep(&st->codecpar->extradata);