diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-24 15:14:02 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-24 15:14:02 +0000 |
commit | fb544759612fa82644e9cea168b176cb04bfb038 (patch) | |
tree | 4281df266d97b329297423b6935c929c6be36ddc /main/translate.c | |
parent | bfb9028ee7b60eb0f3ec6feeb4da128a315166fb (diff) |
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/branches/1.4@65877 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 c9e16b96f..ca044c331 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"); |