diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-28 18:31:21 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-11-02 17:02:22 -0400 |
commit | 7b7f47e73356d113cace74b922eee0b6ff5ffe0b (patch) | |
tree | f9f41a0c1cd83c1af5c6b29f377fa88dad3ffb14 /libavcodec | |
parent | 95fee70d6773fde1c34ff6422f48e5e66f37f263 (diff) | |
download | ffmpeg-7b7f47e73356d113cace74b922eee0b6ff5ffe0b.tar.gz |
imc: validate channel count
ask for a sample if not mono
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/imc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 6bc68cd81c..d0a0d9da02 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -108,6 +108,11 @@ static av_cold int imc_decode_init(AVCodecContext * avctx) IMCContext *q = avctx->priv_data; double r1, r2; + if (avctx->channels != 1) { + av_log_ask_for_sample(avctx, "Number of channels is not supported\n"); + return AVERROR_PATCHWELCOME; + } + q->decoder_reset = 1; for(i = 0; i < BANDS; i++) |