]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7083: fix divide by zero
authorBrian West <brian@freeswitch.org>
Mon, 22 Dec 2014 17:30:01 +0000 (11:30 -0600)
committerBrian West <brian@freeswitch.org>
Mon, 22 Dec 2014 17:30:01 +0000 (11:30 -0600)
src/switch_core_media_bug.c

index a8af7d8f977687b45817360f5520428bbf3db0fc..6dffffe06b0b90cde5c306684222efc0a85ed7d5 100644 (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);