summaryrefslogtreecommitdiff
path: root/libavcodec/dsicinav.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-27 13:33:57 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-10-29 16:43:40 -0400
commit03381c12b3a45200918dea877e970c5705f7cf5a (patch)
treebdf34a32a0d70e06c51f631e81f607328132a5d8 /libavcodec/dsicinav.c
parent664eb77dc3cb63dcb82d27d62540058a78bdab48 (diff)
downloadffmpeg-03381c12b3a45200918dea877e970c5705f7cf5a.tar.gz
cin audio: validate the channel count
Diffstat (limited to 'libavcodec/dsicinav.c')
-rw-r--r--libavcodec/dsicinav.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index 953d232d9b..832efab056 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -307,6 +307,11 @@ static av_cold int cinaudio_decode_init(AVCodecContext *avctx)
{
CinAudioContext *cin = avctx->priv_data;
+ if (avctx->channels != 1) {
+ av_log_ask_for_sample(avctx, "Number of channels is not supported\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
cin->initial_decode_frame = 1;
cin->delta = 0;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;