FS-7083: fix divide by zero

This commit is contained in:
Brian West 2014-12-22 11:30:01 -06:00 committed by Ken Rice
parent 26aba8de77
commit aae4a76f3a

View File

@ -379,6 +379,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
if (switch_test_flag(bug, SMBF_STEREO)) { if (switch_test_flag(bug, SMBF_STEREO)) {
frame->datalen *= 2; frame->datalen *= 2;
frame->channels = 2; frame->channels = 2;
} else {
frame->channels = 1;
} }
memcpy(bug->session->recur_buffer, frame->data, frame->datalen); memcpy(bug->session->recur_buffer, frame->data, frame->datalen);