[asterisk-commits] qwell: trunk r65903 - in /trunk: ./ codecs/
include/asterisk/ main/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu May 24 08:28:30 MST 2007
Author: qwell
Date: Thu May 24 10:28:29 2007
New Revision: 65903
URL: http://svn.digium.com/view/asterisk?view=rev&rev=65903
Log:
Merged revisions 65877 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r65877 | qwell | 2007-05-24 11:14:02 -0400 (Thu, 24 May 2007) | 4 lines
Fix handling of zero-length frames when a codec is capable of native PLC.
Issue 9183, patch by Mihai.
........
Modified:
trunk/ (props changed)
trunk/.cleancount
trunk/codecs/codec_ilbc.c
trunk/codecs/codec_speex.c
trunk/include/asterisk/translate.h
trunk/main/translate.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/.cleancount
URL: http://svn.digium.com/view/asterisk/trunk/.cleancount?view=diff&rev=65903&r1=65902&r2=65903
==============================================================================
--- trunk/.cleancount (original)
+++ trunk/.cleancount Thu May 24 10:28:29 2007
@@ -1,1 +1,1 @@
-30
+31
Modified: trunk/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_ilbc.c?view=diff&rev=65903&r1=65902&r2=65903
==============================================================================
--- trunk/codecs/codec_ilbc.c (original)
+++ trunk/codecs/codec_ilbc.c Thu May 24 10:28:29 2007
@@ -203,6 +203,7 @@
.sample = ilbctolin_sample,
.desc_size = sizeof(struct ilbc_coder_pvt),
.buf_size = BUFFER_SAMPLES * 2,
+ .native_plc = 1,
};
static struct ast_translator lintoilbc = {
Modified: trunk/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_speex.c?view=diff&rev=65903&r1=65902&r2=65903
==============================================================================
--- trunk/codecs/codec_speex.c (original)
+++ trunk/codecs/codec_speex.c Thu May 24 10:28:29 2007
@@ -358,6 +358,7 @@
.desc_size = sizeof(struct speex_coder_pvt),
.buffer_samples = BUFFER_SAMPLES,
.buf_size = BUFFER_SAMPLES * 2,
+ .native_plc = 1,
};
static struct ast_translator lintospeex = {
Modified: trunk/include/asterisk/translate.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/translate.h?view=diff&rev=65903&r1=65902&r2=65903
==============================================================================
--- trunk/include/asterisk/translate.h (original)
+++ trunk/include/asterisk/translate.h Thu May 24 10:28:29 2007
@@ -104,6 +104,7 @@
int desc_size; /*!< size of private descriptor in pvt->pvt, if any */
int plc_samples; /*!< set to the plc block size if used, 0 otherwise */
int useplc; /*!< current status of plc, changed at runtime */
+ int native_plc; /*!< true if the translator can do native plc */
struct ast_module *module; /* opaque reference to the parent module */
Modified: trunk/main/translate.c
URL: http://svn.digium.com/view/asterisk/trunk/main/translate.c?view=diff&rev=65903&r1=65902&r2=65903
==============================================================================
--- trunk/main/translate.c (original)
+++ trunk/main/translate.c Thu May 24 10:28:29 2007
@@ -174,7 +174,9 @@
pvt->samples += l;
pvt->datalen = pvt->samples * 2; /* SLIN has 2bytes for 1sample */
}
- return 0;
+ /* We don't want generic PLC. If the codec has native PLC, then do that */
+ if (!pvt->t->native_plc)
+ return 0;
}
if (pvt->samples + f->samples > pvt->t->buffer_samples) {
ast_log(LOG_WARNING, "Out of buffer space\n");
More information about the asterisk-commits
mailing list