From 0aaf0a07d490fba6e0262959d5b0520aeb5cb4c3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 2 Nov 2012 23:46:47 +0100 Subject: [PATCH] libopencore-amrdec: allow sampling rates other than 8khz Signed-off-by: Michael Niedermayer --- libavcodec/libopencore-amr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c index 2a7d252c67..8dac0c17b1 100644 --- a/libavcodec/libopencore-amr.c +++ b/libavcodec/libopencore-amr.c @@ -31,7 +31,8 @@ static void amr_decode_fix_avctx(AVCodecContext *avctx) { const int is_amr_wb = 1 + (avctx->codec_id == AV_CODEC_ID_AMR_WB); - avctx->sample_rate = 8000 * is_amr_wb; + if (!avctx->sample_rate) + avctx->sample_rate = 8000 * is_amr_wb; if (avctx->channels > 1) { av_log_missing_feature(avctx, "multi-channel AMR", 0);