diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-17 11:18:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-17 11:18:30 +0100 |
commit | 04e611474b9a82ddc8a53b08e80401379a40e410 (patch) | |
tree | 211b6176a0846ad314ebc4e89801a923e7649707 /libavcodec/opus.c | |
parent | fcf3e06fe406823214e95993e210ac2cc2bfa6b4 (diff) | |
download | ffmpeg-04e611474b9a82ddc8a53b08e80401379a40e410.tar.gz |
avcodec/opus: Check count of ambisonic channels
https://tools.ietf.org/html/draft-ietf-codec-ambisonics-01#section-3.1
specifies the maximum as 227
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/opus.c')
-rw-r--r-- | libavcodec/opus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/opus.c b/libavcodec/opus.c index 07e70fd7a4..5847e88e11 100644 --- a/libavcodec/opus.c +++ b/libavcodec/opus.c @@ -381,6 +381,10 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx, " for nonnegative integer n\n"); return AVERROR_INVALIDDATA; } + if (channels > 227) { + av_log(avctx, AV_LOG_ERROR, "Too many channels\n"); + return AVERROR_INVALIDDATA; + } layout = 0; } else layout = 0; |