[Asterisk-code-review] translate.c do not log WARNING on empty audio frame (...asterisk[13])
George Joseph
asteriskteam at digium.com
Fri Jun 21 10:52:14 CDT 2019
George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11481 )
Change subject: translate.c do not log WARNING on empty audio frame
......................................................................
translate.c do not log WARNING on empty audio frame
There is WARNING "no samples for ..." on each Playtones.
The function ast_playtones_start calls ast_activate_generator,
which calls ast_prod.
The function ast_prod calls ast_write with empty audio frame.
In this case it's spam log.
Change-Id: Id4ac309489d9ff281bad02abdef341cecdede660
---
M main/translate.c
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/main/translate.c b/main/translate.c
index a2d733d..68d2cdb 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -404,7 +404,10 @@
pvt->f.seqno = f->seqno;
if (f->samples == 0) {
- ast_log(LOG_WARNING, "no samples for %s\n", pvt->t->name);
+ /* Do not log empty audio frame */
+ if (strcasecmp(f->src, "ast_prod")) {
+ ast_log(LOG_WARNING, "no samples for %s\n", pvt->t->name);
+ }
}
if (pvt->t->buffer_samples) { /* do not pass empty frames to callback */
if (f->datalen == 0) { /* perform native PLC if available */
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11481
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Id4ac309489d9ff281bad02abdef341cecdede660
Gerrit-Change-Number: 11481
Gerrit-PatchSet: 1
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190621/95e1a55e/attachment.html>
More information about the asterisk-code-review
mailing list