]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
sigh
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 18 Oct 2007 22:41:58 +0000 (22:41 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 18 Oct 2007 22:41:58 +0000 (22:41 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5980 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c
src/switch_rtp.c

index 1ea51ff932f948187922d34f659c4681a32fa5c4..df51f62f740183530ae5b3caeb7f382570da2efa 100644 (file)
@@ -1511,7 +1511,7 @@ static void conference_loop_output(conference_member_t * member)
        uint32_t interval = read_codec->implementation->microseconds_per_frame / 1000;
        uint32_t csamples = switch_bytes_per_frame(member->conference->rate, member->conference->interval);
        uint32_t samples = switch_bytes_per_frame(member->conference->rate, interval);
-       uint32_t tsamples = switch_bytes_per_frame(read_codec->implementation->samples_per_second, interval) / 2;
+       uint32_t tsamples = switch_bytes_per_frame(read_codec->implementation->samples_per_second, interval);
        uint32_t low_count = 0, bytes = samples * 2;
        call_list_t *call_list = NULL, *cp = NULL;
 
index 368a518fb43dc10a79e2062df9d7e64ac111a9f4..369be3e554056ef3b931c00c31e33b9e7fe48724 100644 (file)
@@ -847,6 +847,12 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
                        return -1;
                }
 
+               if (rtp_session->recv_msg.header.pt == 9 /* && G722 RFC != LAME */) {
+                       uint32_t rfc_sucks = ntohl(rtp_session->recv_msg.header.ts);
+                       rfc_sucks *= 2;
+                       rtp_session->recv_msg.header.ts = htonl(rfc_sucks);
+               }
+
                if (rtp_session->jb && bytes && rtp_session->recv_msg.header.pt == rtp_session->payload) {
                        if (rtp_session->recv_msg.header.m) {
                                stfu_n_reset(rtp_session->jb);
@@ -1617,7 +1623,9 @@ SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
        }
 
        send_msg = rtp_session->send_msg;
-
+       if (payload == 9 /* && G722 RFC != LAME */) {
+               ts /= 2;
+       }
        send_msg.header.seq = htons(mseq);
        send_msg.header.ts = htonl(ts);
        send_msg.header.ssrc = htonl(ssrc);