[FFmpeg-cvslog] amrnbdec: allow sample 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:45:54 2012 +0100| [d8aaec38fc89bb3b6e7e46d6fd30f939efb07456] | committer: Michael Niedermayer
amrnbdec: allow sample rates other than 8khz
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8aaec38fc89bb3b6e7e46d6fd30f939efb07456
---
libavcodec/amrnbdec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
index 95deee6..a523a54 100644
--- a/libavcodec/amrnbdec.c
+++ b/libavcodec/amrnbdec.c
@@ -169,7 +169,8 @@ static av_cold int amrnb_decode_init(AVCodecContext *avctx)
avctx->channels = 1;
avctx->channel_layout = AV_CH_LAYOUT_MONO;
- avctx->sample_rate = 8000;
+ if (!avctx->sample_rate)
+ avctx->sample_rate = 8000;
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
// p->excitation always points to the same position in p->excitation_buf
More information about the ffmpeg-cvslog
mailing list