Commit 5a3b602a authored by Anton Khirnov's avatar Anton Khirnov Committed by James Almer

avformat/cafdec: reject multichannel Opus streams

Multichannel Opus streams require channel mapping information in extradata.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent b4093e60
......@@ -167,6 +167,12 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment