aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-07-13 14:17:28 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-07-13 17:16:30 +0200
commit8e3c5c70ca9f5a49fdd70e8a545d8c85e437d811 (patch)
tree133a77a4ca51b3b1e028f74a075e42ff5a6ae9a0
parent149def7781fd77af8e0758140337eaabeb1059c0 (diff)
downloadffmpeg-8e3c5c70ca9f5a49fdd70e8a545d8c85e437d811.tar.gz
g726: Do not try to decode more than one channel.
Ask for a sample instead. Reviewed-by: Derek Buitenhuis
-rw-r--r--libavcodec/g726.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 7884f36189..d035b3efb1 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -401,6 +401,10 @@ static av_cold int g726_decode_init(AVCodecContext *avctx)
{
G726Context* c = avctx->priv_data;
+ if(avctx->channels > 1){
+ avpriv_request_sample(avctx, "Decoding more than one channel");
+ return AVERROR_PATCHWELCOME;
+ }
avctx->channels = 1;
avctx->channel_layout = AV_CH_LAYOUT_MONO;