From e8c73cdf2d127d9f07707b5ee79fe68b104cef86 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 30 Dec 2008 23:31:50 +0000 Subject: [PATCH] ptime tweak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11010 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core_io.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/switch_core_io.c b/src/switch_core_io.c index a69dd4059f..2607874618 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -645,6 +645,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess if (!need_codec) { do_write = TRUE; + write_frame = frame; goto done; } @@ -987,9 +988,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess switch_mutex_unlock(session->resample_mutex); } + if (flag & 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) { break; @@ -1003,8 +1009,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess done: + if (ptime_mismatch) { + write_frame->timestamp = 0; + } + if (do_write) { - status = perform_write(session, frame, flags, stream_id); + status = perform_write(session, write_frame, flags, stream_id); } error: