[asterisk-commits] file: trunk r229282 - in /trunk: ./ codecs/codec_g726.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 10 14:06:19 CST 2009
Author: file
Date: Tue Nov 10 14:06:13 2009
New Revision: 229282
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=229282
Log:
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
........
Modified:
trunk/ (props changed)
trunk/codecs/codec_g726.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/codecs/codec_g726.c
URL: http://svnview.digium.com/svn/asterisk/trunk/codecs/codec_g726.c?view=diff&rev=229282&r1=229281&r2=229282
==============================================================================
--- trunk/codecs/codec_g726.c (original)
+++ trunk/codecs/codec_g726.c Tue Nov 10 14:06:13 2009
@@ -769,22 +769,6 @@
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_translator g726tolin = {
.name = "g726tolin",
.srcfmt = AST_FORMAT_G726,
@@ -835,26 +819,6 @@
.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 = g726_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 = g726_sample,
- .buffer_samples = BUFFER_SAMPLES,
- .buf_size = BUFFER_SAMPLES,
-};
-
static int parse_config(int reload)
{
struct ast_variable *var;
@@ -891,9 +855,6 @@
res |= ast_unregister_translator(&g726aal2tolin);
res |= ast_unregister_translator(&lintog726aal2);
- res |= ast_unregister_translator(&g726aal2tog726);
- res |= ast_unregister_translator(&g726tog726aal2);
-
return res;
}
@@ -910,9 +871,6 @@
res |= ast_register_translator(&g726aal2tolin);
res |= ast_register_translator(&lintog726aal2);
-
- res |= ast_register_translator(&g726aal2tog726);
- res |= ast_register_translator(&g726tog726aal2);
if (res) {
unload_module();
More information about the asterisk-commits
mailing list