[FFmpeg-cvslog] g726: Do not try to decode more than one channel.
Carl Eugen Hoyos
git at videolan.org
Sat Jul 13 18:11:23 CEST 2013
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Jul 13 14:17:28 2013 +0200| [8e3c5c70ca9f5a49fdd70e8a545d8c85e437d811] | committer: Carl Eugen Hoyos
g726: Do not try to decode more than one channel.
Ask for a sample instead.
Reviewed-by: Derek Buitenhuis
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e3c5c70ca9f5a49fdd70e8a545d8c85e437d811
---
libavcodec/g726.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 7884f36..d035b3e 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;
More information about the ffmpeg-cvslog
mailing list