aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ws-snd1.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-12 09:44:21 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-09-26 16:23:10 -0400
commit6a818cb3ff2056d43361e5fd09e318cd2ca2a7b4 (patch)
treec4e59402ff670fb02db0a286ee689adf017c3ff4 /libavcodec/ws-snd1.c
parent417364ce1f979031ef6fee661fc15e1869bdb1b4 (diff)
downloadffmpeg-6a818cb3ff2056d43361e5fd09e318cd2ca2a7b4.tar.gz
ws_snd: make sure number of channels is 1
Diffstat (limited to 'libavcodec/ws-snd1.c')
-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 0459128ed3..a9f303add1 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;
}