libopencore-amrdec: allow sampling rates other than 8khz

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-02 23:46:47 +01:00
parent 2c1e9383a2
commit 0aaf0a07d4
1 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@ static void amr_decode_fix_avctx(AVCodecContext *avctx)
{
const int is_amr_wb = 1 + (avctx->codec_id == AV_CODEC_ID_AMR_WB);
if (!avctx->sample_rate)
avctx->sample_rate = 8000 * is_amr_wb;
if (avctx->channels > 1) {