Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-13 07:23:18 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-11-04 04:09:22 +0400
commit62cf52c8602efe8cf8c4713a8f44d5f76a908bb8 (patch)
tree0fe82f932634e4019b0aef49bdbafcde64dcb8c1 /libavcodec
parent7e95a12d51ffc5369f66ab46ce32f8c126678bbc (diff)
truespeech: check to make sure channels == 1
(cherry picked from commit 3e7a176759e8a8e66d65c779b47b5bba793dfd4e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/truespeech.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index d903a0119e..b5f74662ba 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;
}