aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-12 09:44:21 -0400
committerMichael Niedermayer <michaelni@gmx.at>2011-10-01 20:38:11 +0200
commit857c7e122b102da5c635852a32ba067157575311 (patch)
tree3aba71802e1bc52b89be690484e9c2c50510de00 /libavcodec
parent915b905a1b7ee9bd1a1526387abf009a755a8df2 (diff)
downloadffmpeg-857c7e122b102da5c635852a32ba067157575311.tar.gz
ws_snd: make sure number of channels is 1
(cherry picked from commit 6a818cb3ff2056d43361e5fd09e318cd2ca2a7b4)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ws-snd1.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
index 48414c7201..f92c3531e0 100644
--- a/libavcodec/ws-snd1.c
+++ b/libavcodec/ws-snd1.c
@@ -41,6 +41,11 @@ static av_cold int ws_snd_decode_init(AVCodecContext * avctx)
{
// WSSNDContext *c = avctx->priv_data;
+ if (avctx->channels != 1) {
+ av_log_ask_for_sample(avctx, "unsupported number of channels\n");
+ return AVERROR(EINVAL);
+ }
+
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
return 0;
}