codecs: Remove test-law.

This was dead code, test code introduced with Asterisk 13. This was
found while analyzing ASTERISK_28416 and ASTERISK_29185. This change
partly fixes, not closes those two issues.

Change-Id: I42d0daa37f6f334c7d86672f06f085858a3f3940
This commit is contained in:
Alexander Traud
2020-12-01 15:11:58 +01:00
committed by Joshua Colp
parent 51e2187a14
commit 80c14f74bc
8 changed files with 2 additions and 80 deletions

View File

@@ -97,25 +97,6 @@ static struct ast_translator ulawtolin = {
.buf_size = BUFFER_SAMPLES * 2,
};
static struct ast_translator testlawtolin = {
.name = "testlawtolin",
.src_codec = {
.name = "testlaw",
.type = AST_MEDIA_TYPE_AUDIO,
.sample_rate = 8000,
},
.dst_codec = {
.name = "slin",
.type = AST_MEDIA_TYPE_AUDIO,
.sample_rate = 8000,
},
.format = "slin",
.framein = ulawtolin_framein,
.sample = ulaw_sample,
.buffer_samples = BUFFER_SAMPLES,
.buf_size = BUFFER_SAMPLES * 2,
};
/*!
* \brief The complete translator for LinToulaw.
*/
@@ -139,33 +120,12 @@ static struct ast_translator lintoulaw = {
.buffer_samples = BUFFER_SAMPLES,
};
static struct ast_translator lintotestlaw = {
.name = "lintotestlaw",
.src_codec = {
.name = "slin",
.type = AST_MEDIA_TYPE_AUDIO,
.sample_rate = 8000,
},
.dst_codec = {
.name = "testlaw",
.type = AST_MEDIA_TYPE_AUDIO,
.sample_rate = 8000,
},
.format = "testlaw",
.framein = lintoulaw_framein,
.sample = slin8_sample,
.buf_size = BUFFER_SAMPLES,
.buffer_samples = BUFFER_SAMPLES,
};
static int unload_module(void)
{
int res;
res = ast_unregister_translator(&lintoulaw);
res |= ast_unregister_translator(&ulawtolin);
res |= ast_unregister_translator(&testlawtolin);
res |= ast_unregister_translator(&lintotestlaw);
return res;
}
@@ -176,8 +136,6 @@ static int load_module(void)
res = ast_register_translator(&ulawtolin);
res |= ast_register_translator(&lintoulaw);
res |= ast_register_translator(&lintotestlaw);
res |= ast_register_translator(&testlawtolin);
if (res) {
unload_module();