diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-28 01:13:19 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-04-28 01:13:19 +0000 |
commit | e643d45303498cc1d533c1f203553ba2442b3fc0 (patch) | |
tree | a658737825ee5a175bc1c415cd61baea9cd128aa /codecs | |
parent | 6c1aabcd3e22e65ba4b83e66e6099e36b6edbcfb (diff) |
Fix CNG issues in G.723.1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@921 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs')
-rwxr-xr-x | codecs/codec_g723_1.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/codecs/codec_g723_1.c b/codecs/codec_g723_1.c index e8fd71198..ad56bb02e 100755 --- a/codecs/codec_g723_1.c +++ b/codecs/codec_g723_1.c @@ -15,9 +15,10 @@ * the GNU General Public License */ -#define TYPE_SILENCE 0x2 #define TYPE_HIGH 0x0 #define TYPE_LOW 0x1 +#define TYPE_SILENCE 0x2 +#define TYPE_DONTSEND 0x3 #define TYPE_MASK 0x3 #include <asterisk/translate.h> @@ -189,7 +190,9 @@ static struct ast_frame *g723tolin_frameout(struct ast_translator_pvt *pvt) static int g723_len(unsigned char buf) { switch(buf & TYPE_MASK) { - case TYPE_MASK: + case TYPE_DONTSEND: + return 0; + break; case TYPE_SILENCE: return 4; break; @@ -293,6 +296,7 @@ static struct ast_frame *lintog723_frameout(struct ast_translator_pvt *pvt) #endif /* Assume 8000 Hz */ tmp->f.samples += 30; + /* FIXME:SLD: Shouldn't the [0] be [cnt]?? */ cnt += g723_len(tmp->outbuf[0]); tmp->tail -= Frame; /* Move the data at the end of the buffer to the front */ |