aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-06-29 18:04:18 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-06-29 18:04:32 +0200
commit9e992c24357dc19e6b0044584c553e802e0aebd1 (patch)
tree3274f563bef4764a6cd92178fa3119748c6f4825 /src
parent524923a96a9892445234248623d8be642eb5229d (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/trau/osmo_ortp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index c9480ff..c49a23d 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -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