ptime tweak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11010 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-12-30 23:31:50 +00:00
parent 716d8f996e
commit e8c73cdf2d

View File

@ -645,6 +645,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
if (!need_codec) { if (!need_codec) {
do_write = TRUE; do_write = TRUE;
write_frame = frame;
goto done; goto done;
} }
@ -987,10 +988,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
switch_mutex_unlock(session->resample_mutex); switch_mutex_unlock(session->resample_mutex);
} }
if (flag & SFF_CNG) { if (flag & SFF_CNG) {
switch_set_flag(write_frame, SFF_CNG); switch_set_flag(write_frame, SFF_CNG);
} }
if (ptime_mismatch) {
write_frame->timestamp = 0;
}
if ((status = perform_write(session, write_frame, flags, stream_id)) != SWITCH_STATUS_SUCCESS) { if ((status = perform_write(session, write_frame, flags, stream_id)) != SWITCH_STATUS_SUCCESS) {
break; break;
} }
@ -1003,8 +1009,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
done: done:
if (ptime_mismatch) {
write_frame->timestamp = 0;
}
if (do_write) { if (do_write) {
status = perform_write(session, frame, flags, stream_id); status = perform_write(session, write_frame, flags, stream_id);
} }
error: error: