chan_iax2: Fix a crash when using chan_iax2 jitterbuffer settings

Caused by format changes in Asterisk 13

ASTERISK-24265 #close
Reported by: Dafi Ni
Review: https://reviewboard.asterisk.org/r/3999/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2014-09-19 14:56:37 +00:00
parent fade256307
commit c95b53e21a

View File

@@ -4123,7 +4123,7 @@ static void __get_from_jb(const void *p)
if(ms >= (next = jb_next(pvt->jb))) {
struct ast_format *voicefmt;
voicefmt = ast_format_compatibility_bitfield2format(pvt->voiceformat);
ret = jb_get(pvt->jb, &frame, ms, ast_format_get_default_ms(voicefmt));
ret = jb_get(pvt->jb, &frame, ms, voicefmt ? ast_format_get_default_ms(voicefmt) : 20);
switch(ret) {
case JB_OK:
fr = frame.data;