osmo_ortp.c: Duration of a RTP frame affects timestamp of the next one

Duration of an RTP frames dictates the timestamp used for the next
frame, not for the one being sent now. It was done like this before to
account for possible losses.
Implementation wise, the duration was understood as "duration
between last frame was sent and now when current one is sent". It makes
more sense to use it as the duration in number of sampling ticks
as described on the function documentation, specially now that we can
account for extra time by means of osmo_rtp_skipped_frame.

Change-Id: Ib8f5fa5509059fe908c09a4381844c613d478548
This commit is contained in:
Pau Espin 2017-06-29 18:04:18 +02:00
parent 524923a96a
commit 9e992c2435
1 changed files with 1 additions and 1 deletions

View File

@ -496,9 +496,9 @@ int osmo_rtp_send_frame_ext(struct osmo_rtp_socket *rs, const uint8_t *payload,
return -ENOMEM;
rtp_set_markbit(mblk, marker);
rs->tx_timestamp += duration;
rc = rtp_session_sendm_with_ts(rs->sess, mblk,
rs->tx_timestamp);
rs->tx_timestamp += duration;
if (rc < 0) {
/* no need to free() the mblk, as rtp_session_rtp_send()
* unconditionally free()s the mblk even in case of