libopencore-amr: allow sampling rates other than 8khz
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 2 Nov 2012 22:47:12 +0000 (23:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 2 Nov 2012 22:47:58 +0000 (23:47 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libopencore-amr.c

index 8dac0c1..cbc414c 100644 (file)
@@ -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);
     }