amrwbdec: allow sample rates other than 16khz
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 2 Nov 2012 22:46:19 +0000 (23:46 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 2 Nov 2012 22:47:58 +0000 (23:47 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/amrwbdec.c

index 79a9f14..a0e7cd6 100644 (file)
@@ -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);