[asterisk-commits] kpfleming: branch 1.4 r92656 - /branches/1.4/codecs/codec_zap.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 12 16:00:40 CST 2007
Author: kpfleming
Date: Wed Dec 12 16:00:39 2007
New Revision: 92656
URL: http://svn.digium.com/view/asterisk?view=rev&rev=92656
Log:
emit a warning message when we drop a G.729B CNG frame destined for the transcoder
Modified:
branches/1.4/codecs/codec_zap.c
Modified: branches/1.4/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/codecs/codec_zap.c?view=diff&rev=92656&r1=92655&r2=92656
==============================================================================
--- branches/1.4/codecs/codec_zap.c (original)
+++ branches/1.4/codecs/codec_zap.c Wed Dec 12 16:00:39 2007
@@ -108,6 +108,7 @@
struct pvt {
int fd;
int fake;
+ unsigned int g729b_warning:1;
#ifdef DEBUG_TRANSCODE
int totalms;
int lasttotalms;
@@ -151,6 +152,10 @@
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;
}
More information about the asterisk-commits
mailing list