summaryrefslogtreecommitdiff
path: root/libavformat/cafdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/cafdec.c')
-rw-r--r--libavformat/cafdec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index efc8c49c4a..d6b6007a1d 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -156,6 +156,14 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
avio_skip(pb, size - ALAC_NEW_KUKI);
}
st->codecpar->extradata_size = ALAC_HEADER;
+ } 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 {
st->codecpar->extradata = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codecpar->extradata)