summaryrefslogtreecommitdiff
path: root/libavcodec/amrwbdec.c
diff options
context:
space:
mode:
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);