summaryrefslogtreecommitdiffstats
path: root/libavcodec/gsmdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-03 00:39:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-03 00:50:22 +0100
commit6e6033b793a3124a966f0d2c4fefb1bdfc660db9 (patch)
tree0b159934fcb60cec7c0693831d1a43185071fe59 /libavcodec/gsmdec.c
parent20ac916e6d94cc9df95ca76cabf99c25776dbe41 (diff)
downloadffmpeg-streaming-6e6033b793a3124a966f0d2c4fefb1bdfc660db9.zip
ffmpeg-streaming-6e6033b793a3124a966f0d2c4fefb1bdfc660db9.tar.gz
gsmdec: fix decoding of non 8khz gsm files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/gsmdec.c')
-rw-r--r--libavcodec/gsmdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
index f51a083..3e1b86a 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) {
OpenPOWER on IntegriCloud