summaryrefslogtreecommitdiff
path: root/libavcodec/amrwbdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-02 23:46:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-02 23:47:58 +0100
commit2c1e9383a275a1591cc4d42fcdaa18b753800334 (patch)
tree369f252ee5eebb4a7b99025d59d6dfa6b028b9df /libavcodec/amrwbdec.c
parentd8aaec38fc89bb3b6e7e46d6fd30f939efb07456 (diff)
downloadffmpeg-2c1e9383a275a1591cc4d42fcdaa18b753800334.tar.gz
amrwbdec: allow sample rates other than 16khz
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/amrwbdec.c')
-rw-r--r--libavcodec/amrwbdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 79a9f14a1c..a0e7cd66b3 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -105,7 +105,8 @@ static av_cold int amrwb_decode_init(AVCodecContext *avctx)
avctx->channels = 1;
avctx->channel_layout = AV_CH_LAYOUT_MONO;
- avctx->sample_rate = 16000;
+ if (!avctx->sample_rate)
+ avctx->sample_rate = 16000;
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
av_lfg_init(&ctx->prng, 1);