aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-28 18:31:21 -0400
committerMichael Niedermayer <michaelni@gmx.at>2011-11-04 13:34:42 +0100
commitcba03dc66730cab43a4257bc027d35f09c393f62 (patch)
tree8ef069640b14f1836dadf039be0929756a8cdf8b
parent5a3f494466afb9eb9c20e69fa92dfdbae386573a (diff)
downloadffmpeg-cba03dc66730cab43a4257bc027d35f09c393f62.tar.gz
imc: validate channel count
ask for a sample if not mono (cherry picked from commit 7b7f47e73356d113cace74b922eee0b6ff5ffe0b) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/imc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index ea0318c371..bc1a6a9f3c 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++)