[Asterisk-code-review] chan_iax2: permit frames without voice format. (asterisk[master])
Jaco Kroon
asteriskteam at digium.com
Fri Jun 24 09:14:13 CDT 2022
Jaco Kroon has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18689 )
Change subject: chan_iax2: permit frames without voice format.
......................................................................
chan_iax2: permit frames without voice format.
This is needed because a number of frames do not have voice (eg, CONTROL
/ RINGING).
This partially reverts 2a141a58b61ba0ed91061e1acc2c1955e0160f73 which
was for:
AST-2021-008 - chan_iax2: remote crash on unsupported media format
This fixes my immediate issue, however may re-introduce the issue. Is
there a reliable test case for the crash which can be used to validate
that this doesn't re-introduce the problem?
Change-Id: I80f9c1af4b2cd8281dbd74cb7cbc01b8deccdf96
Signed-off-by: Jaco Kroon <jaco at uls.co.za>
---
M channels/chan_iax2.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/18689/1
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 210c344..9276fc7 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -4149,9 +4149,9 @@
ms = ast_tvdiff_ms(now, pvt->rxcore);
- voicefmt = ast_format_compatibility_bitfield2format(pvt->voiceformat);
- if (voicefmt && ms >= (next = jb_next(pvt->jb))) {
- ret = jb_get(pvt->jb, &frame, ms, ast_format_get_default_ms(voicefmt));
+ if (ms >= (next = jb_next(pvt->jb))) {
+ voicefmt = ast_format_compatibility_bitfield2format(pvt->voiceformat);
+ ret = jb_get(pvt->jb, &frame, ms, voicefmt ? ast_format_get_default_ms(voicefmt) : 20);
switch(ret) {
case JB_OK:
fr = frame.data;
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18689
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I80f9c1af4b2cd8281dbd74cb7cbc01b8deccdf96
Gerrit-Change-Number: 18689
Gerrit-PatchSet: 1
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220624/868c3147/attachment.html>
More information about the asterisk-code-review
mailing list