[FFmpeg-cvslog] gsmdec: fix decoding of non 8khz gsm files

Michael Niedermayer git at videolan.org
Sat Nov 3 00:51:12 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov  3 00:39:46 2012 +0100| [6e6033b793a3124a966f0d2c4fefb1bdfc660db9] | committer: Michael Niedermayer

gsmdec: fix decoding of non 8khz gsm files

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

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

 libavcodec/gsmdec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
index f51a083..3e1b86a 100644
--- a/libavcodec/gsmdec.c
+++ b/libavcodec/gsmdec.c
@@ -37,7 +37,8 @@ static av_cold int gsm_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_S16;
 
     switch (avctx->codec_id) {



More information about the ffmpeg-cvslog mailing list