projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95fee70
)
imc: validate channel count
author
Justin Ruggles
<justin.ruggles@gmail.com>
Fri, 28 Oct 2011 22:31:21 +0000
(18:31 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 2 Nov 2011 21:02:22 +0000
(17:02 -0400)
ask for a sample if not mono
libavcodec/imc.c
patch
|
blob
|
history
diff --git
a/libavcodec/imc.c
b/libavcodec/imc.c
index
6bc68cd
..
d0a0d9d
100644
(file)
--- 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++)