From: Justin Ruggles Date: Thu, 13 Oct 2011 03:23:18 +0000 (-0400) Subject: truespeech: check to make sure channels == 1 X-Git-Tag: android-x86-4.4-r1~8529^2~5132 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3e7a176759e8a8e66d65c779b47b5bba793dfd4e;p=android-x86%2Fexternal-ffmpeg.git truespeech: check to make sure channels == 1 --- diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c index 6f663f30c5..555ec87f00 100644 --- a/libavcodec/truespeech.c +++ b/libavcodec/truespeech.c @@ -56,6 +56,11 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx) { // TSContext *c = avctx->priv_data; + if (avctx->channels != 1) { + av_log_ask_for_sample(avctx, "Unsupported channel count: %d\n", avctx->channels); + return AVERROR(EINVAL); + } + avctx->sample_fmt = AV_SAMPLE_FMT_S16; return 0; }