diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-12 23:23:18 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-13 16:25:59 -0400 |
commit | 3e7a176759e8a8e66d65c779b47b5bba793dfd4e (patch) | |
tree | 4e783fc05df7e050be79bd1b21c8c2ee7183dc10 /libavcodec/truespeech.c | |
parent | a8f8db2636cf9f605fbe842d1136a3e1acc3c9b2 (diff) | |
download | ffmpeg-3e7a176759e8a8e66d65c779b47b5bba793dfd4e.tar.gz |
truespeech: check to make sure channels == 1
Diffstat (limited to 'libavcodec/truespeech.c')
-rw-r--r-- | libavcodec/truespeech.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |