diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-24 15:28:29 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-24 15:28:29 +0000 |
commit | 943e4bad3dad518eedc05a544b9fb735a24c1a54 (patch) | |
tree | 51c587dfda5030e184f229b4435fb6bd57e1b37d /main/translate.c | |
parent | a7048e08b09d84023ae0154a7249ead8ba7db2e2 (diff) |
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.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65903 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/translate.c')
-rw-r--r-- | main/translate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/translate.c b/main/translate.c index c7387a713..7ed772458 100644 --- a/main/translate.c +++ b/main/translate.c @@ -174,7 +174,9 @@ static int framein(struct ast_trans_pvt *pvt, struct ast_frame *f) 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"); |