OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8f8db2
)
truespeech: check to make sure channels == 1
author
Justin Ruggles
<justin.ruggles@gmail.com>
Thu, 13 Oct 2011 03:23:18 +0000
(23:23 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Thu, 13 Oct 2011 20:25:59 +0000
(16:25 -0400)
libavcodec/truespeech.c
patch
|
blob
|
history
diff --git
a/libavcodec/truespeech.c
b/libavcodec/truespeech.c
index
6f663f3
..
555ec87
100644
(file)
--- 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;
}