From d8aaec38fc89bb3b6e7e46d6fd30f939efb07456 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 2 Nov 2012 23:45:54 +0100 Subject: [PATCH] amrnbdec: allow sample rates other than 8khz Signed-off-by: Michael Niedermayer --- libavcodec/amrnbdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c index 95deee63f2..a523a54ccb 100644 --- a/libavcodec/amrnbdec.c +++ b/libavcodec/amrnbdec.c @@ -169,7 +169,8 @@ static av_cold int amrnb_decode_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_FLT; // p->excitation always points to the same position in p->excitation_buf