Browse Source

avcodec/gsmdec: reject unsupported msn audio modes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Piotr Bandurski Michael Niedermayer 12 years ago
parent
commit
1ee1a3d9f4
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      libavcodec/gsmdec.c

+ 8
- 0
libavcodec/gsmdec.c View File

@@ -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)


Loading…
Cancel
Save