[SCM] libav/experimental: Support 16K samplerate in Nellymoser. patch by Alexander Chemeris, ipse.ffmpeg gmail.com
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:45:36 UTC 2013
The following commit has been merged in the experimental branch:
commit c67d725589596bf7a872525727d93bd24311a5eb
Author: Alexander Chemeris <ipse.ffmpeg at gmail.com>
Date: Mon May 11 19:21:49 2009 +0000
Support 16K samplerate in Nellymoser.
patch by Alexander Chemeris, ipse.ffmpeg gmail.com
Originally committed as revision 18798 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index cf4a916..94f4418 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -170,6 +170,8 @@ static int decode_tag(AVCodecContext * avctx,
blocks = 1; break;
case 128: // 11025Hz
blocks = 2; break;
+ case 192: // 16000Hz
+ blocks = 3; break;
case 256: // 22050Hz
blocks = 4; break;
case 512: // 44100Hz
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 1cf0f14..1bb6c66 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -135,10 +135,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
return -1;
}
- if (avctx->sample_rate != 8000 && avctx->sample_rate != 11025 &&
+ if (avctx->sample_rate != 8000 && avctx->sample_rate != 16000 &&
+ avctx->sample_rate != 11025 &&
avctx->sample_rate != 22050 && avctx->sample_rate != 44100 &&
avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
- av_log(avctx, AV_LOG_ERROR, "Nellymoser works only with 8000, 11025, 22050 and 44100 sample rate\n");
+ av_log(avctx, AV_LOG_ERROR, "Nellymoser works only with 8000, 16000, 11025, 22050 and 44100 sample rate\n");
return -1;
}
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list