[Freeswitch-svn] [commit] r11010 - freeswitch/trunk/src

FreeSWITCH SVN anthm at freeswitch.org
Tue Dec 30 15:31:50 PST 2008


Author: anthm
Date: Tue Dec 30 18:31:50 2008
New Revision: 11010

Log:
ptime tweak

Modified:
   freeswitch/trunk/src/switch_core_io.c

Modified: freeswitch/trunk/src/switch_core_io.c
==============================================================================
--- freeswitch/trunk/src/switch_core_io.c	(original)
+++ freeswitch/trunk/src/switch_core_io.c	Tue Dec 30 18:31:50 2008
@@ -645,6 +645,7 @@
 
 	if (!need_codec) {
 		do_write = TRUE;
+		write_frame = frame;
 		goto done;
 	}
 
@@ -987,9 +988,14 @@
 							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 @@
 	
  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:



More information about the Freeswitch-svn mailing list