mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
res_remb_modifier: Propertly initialize bitrate to 0.0
...and return the frame unaltered if bitrate can't be determined. Change-Id: Ib2175ab84f85a3d7060d31625f5a2c7fbcc2ba4c
This commit is contained in:
committed by
Joshua Colp
parent
fbed32a1a5
commit
7487fc88d2
@@ -62,7 +62,7 @@ static struct ast_frame *remb_hook_event_cb(struct ast_channel *chan, struct ast
|
||||
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 @@ static struct ast_frame *remb_hook_event_cb(struct ast_channel *chan, struct ast
|
||||
bitrate = remb_values->receive_bitrate;
|
||||
} else if (event == AST_FRAMEHOOK_EVENT_WRITE && remb_values->send_bitrate) {
|
||||
bitrate = remb_values->send_bitrate;
|
||||
} else {
|
||||
return frame;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user