FS-7083: fix divide by zero

This commit is contained in:
Brian West 2014-12-22 11:30:01 -06:00
parent 0a0b9262b4
commit 0200bc1a02
1 changed files with 2 additions and 0 deletions

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)) {
frame->datalen *= 2;
frame->channels = 2;
} else {
frame->channels = 1;
}
memcpy(bug->session->recur_buffer, frame->data, frame->datalen);