diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-03 00:39:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-03 00:50:22 +0100 |
commit | 6e6033b793a3124a966f0d2c4fefb1bdfc660db9 (patch) | |
tree | 0b159934fcb60cec7c0693831d1a43185071fe59 | |
parent | 20ac916e6d94cc9df95ca76cabf99c25776dbe41 (diff) | |
download | ffmpeg-6e6033b793a3124a966f0d2c4fefb1bdfc660db9.tar.gz |
gsmdec: fix decoding of non 8khz gsm files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/gsmdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c index f51a083085..3e1b86a981 100644 --- a/libavcodec/gsmdec.c +++ b/libavcodec/gsmdec.c @@ -37,7 +37,8 @@ static av_cold int gsm_init(AVCodecContext *avctx) avctx->channels = 1; avctx->channel_layout = AV_CH_LAYOUT_MONO; - avctx->sample_rate = 8000; + if (!avctx->sample_rate) + avctx->sample_rate = 8000; avctx->sample_fmt = AV_SAMPLE_FMT_S16; switch (avctx->codec_id) { |