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,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); 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) { if (avctx->channels > 1) {
av_log_missing_feature(avctx, "multi-channel AMR", 0); av_log_missing_feature(avctx, "multi-channel AMR", 0);