forked from mirrors/linphone-iphone
compute after locking (otherwise we might compute an obsolette time)
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@492 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
3225e1bf6d
commit
b645009425
1 changed files with 3 additions and 2 deletions
|
|
@ -805,13 +805,13 @@ __rtp_session_sendm_with_ts (RtpSession * session, mblk_t *mp, uint32_t packet_t
|
|||
* not block */
|
||||
if (session->flags & RTP_SESSION_SCHEDULED)
|
||||
{
|
||||
wait_point_lock(&session->snd.wp);
|
||||
packet_time =
|
||||
rtp_session_ts_to_time (session,
|
||||
send_ts -
|
||||
session->rtp.snd_ts_offset) +
|
||||
session->rtp.snd_time_offset;
|
||||
/*ortp_message("rtp_session_send_with_ts: packet_time=%i time=%i",packet_time,sched->time_);*/
|
||||
wait_point_lock(&session->snd.wp);
|
||||
if (TIME_IS_STRICTLY_NEWER_THAN (packet_time, sched->time_))
|
||||
{
|
||||
wait_point_wakeup_at(&session->snd.wp,packet_time,(session->flags & RTP_SESSION_BLOCKING_MODE)!=0);
|
||||
|
|
@ -1079,13 +1079,14 @@ rtp_session_recvm_with_ts (RtpSession * session, uint32_t user_ts)
|
|||
* wanted expires */
|
||||
/* but we must not block the process if the timestamp wanted by the application is older
|
||||
* than current time */
|
||||
wait_point_lock(&session->rcv.wp);
|
||||
packet_time =
|
||||
rtp_session_ts_to_time (session,
|
||||
user_ts -
|
||||
session->rtp.rcv_query_ts_offset) +
|
||||
session->rtp.rcv_time_offset;
|
||||
ortp_debug ("rtp_session_recvm_with_ts: packet_time=%i, time=%i",packet_time, sched->time_);
|
||||
wait_point_lock(&session->rcv.wp);
|
||||
|
||||
if (TIME_IS_STRICTLY_NEWER_THAN (packet_time, sched->time_))
|
||||
{
|
||||
wait_point_wakeup_at(&session->rcv.wp,packet_time, (session->flags & RTP_SESSION_BLOCKING_MODE)!=0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue