[Asterisk-code-review] translate.c do not log WARNING on empty audio frame (...asterisk[16])
Friendly Automation
asteriskteam at digium.com
Fri Jun 21 10:37:49 CDT 2019
Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11473 )
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
Friendly Automation: Approved for Submit
diff --git a/main/translate.c b/main/translate.c
index 26f9c9b..fe46460 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -402,7 +402,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/+/11473
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Id4ac309489d9ff281bad02abdef341cecdede660
Gerrit-Change-Number: 11473
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/4848331b/attachment.html>
More information about the asterisk-code-review
mailing list