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

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


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

libopencore-amr: 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=b30f4510d8c7ab1a9f2dd94a0abf57b15b1e39ab
---

 libavcodec/libopencore-amr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 8dac0c1..cbc414c 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -193,7 +193,7 @@ static av_cold int amr_nb_encode_init(AVCodecContext *avctx)
 {
     AMRContext *s = avctx->priv_data;
 
-    if (avctx->sample_rate != 8000) {
+    if (avctx->sample_rate != 8000 && avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) {
         av_log(avctx, AV_LOG_ERROR, "Only 8000Hz sample rate supported\n");
         return AVERROR(ENOSYS);
     }



More information about the ffmpeg-cvslog mailing list