diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-12 22:00:39 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-12 22:00:39 +0000 |
commit | 38e7d7b10602ea2f90836a1a1cd063a50f3ae40a (patch) | |
tree | 599c97bab066383f5e09386cbff6885d4af2cdb9 /codecs | |
parent | 1223e184cd605d66ae8e8f3910a39a0f2cf0c4a0 (diff) |
emit a warning message when we drop a G.729B CNG frame destined for the transcoder
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92656 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs')
-rw-r--r-- | codecs/codec_zap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c index aa08667e2..34de33fce 100644 --- a/codecs/codec_zap.c +++ b/codecs/codec_zap.c @@ -108,6 +108,7 @@ static AST_LIST_HEAD_STATIC(translators, translator); struct pvt { int fd; int fake; + unsigned int g729b_warning:1; #ifdef DEBUG_TRANSCODE int totalms; int lasttotalms; @@ -151,6 +152,10 @@ static int zap_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) we need to avoid sending that to the transcoder */ if ((f->subclass == AST_FORMAT_G729A) && ((f->datalen % 10) != 0)) { + if (!ztp->g729b_warning) { + ast_log(LOG_WARNING, "G.729B CNG frame received but is not supported; dropping.\n"); + ztp->g729b_warning = 1; + } f->datalen -= f->datalen % 10; f->samples = f->datalen * 8; } |