FS-6891 FS-7002 FS-7059 FS-7072 FS-7073 FS-7076 #close #comment All of these bugs are invalidated due to a botched revert -- commit 72c3df5ed3 was supposed to revert commit 1b612fecb6 but it only reverted part of it. commit 158c1f23da from the other day was erroneously created to work around the result of the botched revert so it is reverted. The result of this commit should be to bring it back to effectively properly revert 1b612fecb6 and now you can test and open new bugs if necessary. This includes the segfault in eavesdrop, and any media bug releated reports. Consider working together and only reporting one new bug if you still encounter any more problems and be sure to include details and make sure the jitter buffer is being used.

This commit is contained in:
Anthony Minessale
2014-12-11 20:57:55 -06:00
committed by Ken Rice
parent ebf4ab4a1e
commit 4c3c149d3d
3 changed files with 3 additions and 57 deletions

View File

@@ -762,26 +762,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
switch_media_bug_t *bp;
switch_bool_t ok = SWITCH_TRUE;
int prune = 0;
switch_time_t now = switch_micro_time_now();
switch_time_t diff = 0;
switch_size_t len = session->read_impl.decoded_bytes_per_packet;
unsigned char fill_data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};
switch_thread_rwlock_rdlock(session->bug_rwlock);
if (session->last_read_time && session->last_read_time < now) {
diff = ((now - session->last_read_time) + 3000 ) / session->read_impl.microseconds_per_packet;
if (diff > 1) {
memset(fill_data, 255, len);
}
}
session->last_read_time = switch_micro_time_now();
for (bp = session->bugs; bp; bp = bp->next) {
ok = SWITCH_TRUE;
if (switch_channel_test_flag(session->channel, CF_PAUSE_BUGS) && !switch_core_media_bug_test_flag(bp, SMBF_NO_PAUSE)) {
continue;
}
@@ -801,17 +786,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
if (ok && bp->ready && switch_test_flag(bp, SMBF_READ_STREAM)) {
switch_mutex_lock(bp->read_mutex);
if (diff > 1) {
switch_time_t tdiff = diff;
while(tdiff > 1) {
switch_buffer_write(bp->raw_read_buffer, fill_data, len);
tdiff--;
}
}
if (bp->read_demux_frame) {
uint8_t data[SWITCH_RECOMMENDED_BUFFER_SIZE];
int bytes = read_frame->datalen / 2;
@@ -1371,23 +1345,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
if (session->bugs) {
switch_media_bug_t *bp;
int prune = 0;
switch_time_t now = switch_micro_time_now();
switch_time_t diff = 0;
switch_size_t len = session->read_impl.decoded_bytes_per_packet;
unsigned char fill_data[SWITCH_RECOMMENDED_BUFFER_SIZE] = {0};
switch_thread_rwlock_rdlock(session->bug_rwlock);
if (session->last_write_time && session->last_write_time < now) {
diff = ((now - session->last_write_time) + 3000 ) / session->read_impl.microseconds_per_packet;
if (diff > 1) {
memset(fill_data, 255, len);
}
}
session->last_write_time = switch_micro_time_now();
for (bp = session->bugs; bp; bp = bp->next) {
switch_bool_t ok = SWITCH_TRUE;
@@ -1410,15 +1369,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
if (switch_test_flag(bp, SMBF_WRITE_STREAM)) {
switch_mutex_lock(bp->write_mutex);
if (diff > 1) {
switch_time_t tdiff = diff;
while(tdiff > 1) {
switch_buffer_write(bp->raw_read_buffer, fill_data, len);
tdiff--;
}
}
switch_buffer_write(bp->raw_write_buffer, write_frame->data, write_frame->datalen);
switch_mutex_unlock(bp->write_mutex);