[Asterisk-code-review] res_remb_modifier: Propertly initialize bitrate to 0.0 (...asterisk[16])
Friendly Automation
asteriskteam at digium.com
Thu Apr 18 11:44:24 CDT 2019
Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11295 )
Change subject: res_remb_modifier: Propertly initialize bitrate to 0.0
......................................................................
res_remb_modifier: Propertly initialize bitrate to 0.0
...and return the frame unaltered if bitrate can't be determined.
Change-Id: Ib2175ab84f85a3d7060d31625f5a2c7fbcc2ba4c
---
M res/res_remb_modifier.c
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
mattf: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/res/res_remb_modifier.c b/res/res_remb_modifier.c
index a4a83bc..bf56391 100644
--- a/res/res_remb_modifier.c
+++ b/res/res_remb_modifier.c
@@ -62,7 +62,7 @@
struct ast_datastore *remb_store;
struct remb_values *remb_values;
int exp;
- float bitrate;
+ float bitrate = 0.0;
if (!frame) {
return NULL;
@@ -98,6 +98,8 @@
bitrate = remb_values->receive_bitrate;
} else if (event == AST_FRAMEHOOK_EVENT_WRITE && remb_values->send_bitrate) {
bitrate = remb_values->send_bitrate;
+ } else {
+ return frame;
}
/*
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11295
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ib2175ab84f85a3d7060d31625f5a2c7fbcc2ba4c
Gerrit-Change-Number: 11295
Gerrit-PatchSet: 4
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: mattf <creslin at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190418/3750b878/attachment.html>
More information about the asterisk-code-review
mailing list