diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2013-08-13 23:09:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-13 23:59:39 +0200 |
commit | 1ee1a3d9f4e152b641f05d2be6dbe3f440485cca (patch) | |
tree | adbfe84a8b3039d265cf09cd96a3a088a4f093fe | |
parent | bbbd9596ad8f3cb19797f78e895ee6026d64147e (diff) | |
download | ffmpeg-streaming-1ee1a3d9f4e152b641f05d2be6dbe3f440485cca.zip ffmpeg-streaming-1ee1a3d9f4e152b641f05d2be6dbe3f440485cca.tar.gz |
avcodec/gsmdec: reject unsupported msn audio modes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/gsmdec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c index dc64267..5de6da4 100644 --- a/libavcodec/gsmdec.c +++ b/libavcodec/gsmdec.c @@ -34,6 +34,14 @@ static av_cold int gsm_init(AVCodecContext *avctx) { + if (avctx->codec_tag == 0x0032 && + avctx->bit_rate != 13000 && + avctx->bit_rate != 17912 && + avctx->bit_rate != 35824 && + avctx->bit_rate != 71656) { + av_log(avctx, AV_LOG_ERROR, "Unsupported audio mode\n"); + return AVERROR_PATCHWELCOME; + } avctx->channels = 1; avctx->channel_layout = AV_CH_LAYOUT_MONO; if (!avctx->sample_rate) |