diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-10 20:09:02 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-10 20:09:02 +0000 |
commit | 06285400a47f75d27d8c50f22e3db7a0187e177f (patch) | |
tree | c42712a6fc7f8c4cebd994b2028a222751b083ef /codecs | |
parent | 287a340fa701305ae8ddfcb40ef95a9960cdeb8e (diff) |
Merged revisions 229282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r229282 | file | 2009-11-10 16:06:13 -0400 (Tue, 10 Nov 2009) | 15 lines
Merged revisions 229281 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r229281 | file | 2009-11-10 16:03:14 -0400 (Tue, 10 Nov 2009) | 8 lines
Remove broken support for direct transcoding between G.726 RFC3551 and G.726 AAL2.
On some systems the translation core would actually consider g726aal2 -> g726 -> signed linear
to be a quicker path then g726aal2 -> signed linear which exposed this problem.
(closes issue #15504)
Reported by: globalnetinc
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@229284 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs')
-rw-r--r-- | codecs/codec_g726.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/codecs/codec_g726.c b/codecs/codec_g726.c index 80e0e8ea9..754489333 100644 --- a/codecs/codec_g726.c +++ b/codecs/codec_g726.c @@ -770,22 +770,6 @@ static int lintog726_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) return 0; } -/*! \brief convert G726-32 RFC3551 packed data into AAL2 packed data (or vice-versa) */ -static int g726tog726aal2_framein(struct ast_trans_pvt *pvt, struct ast_frame *f) -{ - unsigned char *src = f->data.ptr; - unsigned char *dst = pvt->outbuf.uc + pvt->samples; - unsigned int i; - - for (i = 0; i < f->datalen; i++) - *dst++ = ((src[i] & 0xf) << 4) | (src[i] >> 4); - - pvt->samples += f->samples; - pvt->datalen += f->samples; /* 1 byte/sample */ - - return 0; -} - static struct ast_frame *g726tolin_sample(void) { static struct ast_frame f = { @@ -864,26 +848,6 @@ static struct ast_translator lintog726aal2 = { .buf_size = BUFFER_SAMPLES / 2, }; -static struct ast_translator g726tog726aal2 = { - .name = "g726tog726aal2", - .srcfmt = AST_FORMAT_G726, - .dstfmt = AST_FORMAT_G726_AAL2, - .framein = g726tog726aal2_framein, /* same for both directions */ - .sample = lintog726_sample, - .buffer_samples = BUFFER_SAMPLES, - .buf_size = BUFFER_SAMPLES, -}; - -static struct ast_translator g726aal2tog726 = { - .name = "g726aal2tog726", - .srcfmt = AST_FORMAT_G726_AAL2, - .dstfmt = AST_FORMAT_G726, - .framein = g726tog726aal2_framein, /* same for both directions */ - .sample = lintog726_sample, - .buffer_samples = BUFFER_SAMPLES, - .buf_size = BUFFER_SAMPLES, -}; - static int parse_config(int reload) { struct ast_variable *var; @@ -922,9 +886,6 @@ static int unload_module(void) res |= ast_unregister_translator(&g726aal2tolin); res |= ast_unregister_translator(&lintog726aal2); - res |= ast_unregister_translator(&g726aal2tog726); - res |= ast_unregister_translator(&g726tog726aal2); - return res; } @@ -942,9 +903,6 @@ static int load_module(void) res |= ast_register_translator(&g726aal2tolin); res |= ast_register_translator(&lintog726aal2); - res |= ast_register_translator(&g726aal2tog726); - res |= ast_register_translator(&g726tog726aal2); - if (res) { unload_module(); return AST_MODULE_LOAD_FAILURE; |