[FFmpeg-cvslog] cin audio: validate the channel count
Justin Ruggles
git at videolan.org
Fri Nov 4 13:52:48 CET 2011
ffmpeg | branch: release/0.8 | Justin Ruggles <justin.ruggles at gmail.com> | Thu Oct 27 13:33:57 2011 -0400| [711e6c947b728b23e84f15152fa59ef8ae20de63] | committer: Michael Niedermayer
cin audio: validate the channel count
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=711e6c947b728b23e84f15152fa59ef8ae20de63
---
libavcodec/dsicinav.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index faca821..d4dbb35 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -310,6 +310,11 @@ static av_cold int cinaudio_decode_init(AVCodecContext *avctx)
CinAudioContext *cin = avctx->priv_data;
cin->avctx = avctx;
+ 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;
More information about the ffmpeg-cvslog
mailing list