[FFmpeg-cvslog] libopencore-amrdec: allow sampling rates other than 8khz

Michael Niedermayer git at videolan.org
Sat Nov 3 00:09:31 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Nov  2 23:46:47 2012 +0100| [0aaf0a07d490fba6e0262959d5b0520aeb5cb4c3] | committer: Michael Niedermayer

libopencore-amrdec: allow sampling rates other than 8khz

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0aaf0a07d490fba6e0262959d5b0520aeb5cb4c3
---

 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 2a7d252..8dac0c1 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);



More information about the ffmpeg-cvslog mailing list