summaryrefslogtreecommitdiffstats
path: root/src/modules/rtp/module-rtp-recv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/rtp/module-rtp-recv.c')
-rw-r--r--src/modules/rtp/module-rtp-recv.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 33e23af2..e7749cdd 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -229,7 +229,7 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) {
}
}
- /* Check wheter there was a timestamp overflow */
+ /* Check whether there was a timestamp overflow */
k = (int64_t) s->rtp_context.timestamp - (int64_t) s->offset;
j = (int64_t) 0x100000000LL - (int64_t) s->offset + (int64_t) s->rtp_context.timestamp;
@@ -238,7 +238,7 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) {
else
delta = j;
- pa_memblockq_seek(s->memblockq, delta * (int64_t) s->rtp_context.frame_size, PA_SEEK_RELATIVE);
+ pa_memblockq_seek(s->memblockq, delta * (int64_t) s->rtp_context.frame_size, PA_SEEK_RELATIVE, TRUE);
pa_rtclock_get(&now);
@@ -246,7 +246,7 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) {
if (pa_memblockq_push(s->memblockq, &chunk) < 0) {
pa_log_warn("Queue overrun");
- pa_memblockq_seek(s->memblockq, (int64_t) chunk.length, PA_SEEK_RELATIVE);
+ pa_memblockq_seek(s->memblockq, (int64_t) chunk.length, PA_SEEK_RELATIVE, TRUE);
}
/* pa_log("blocks in q: %u", pa_memblockq_get_nblocks(s->memblockq)); */
@@ -430,8 +430,14 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
s->sdp_info = *sdp_info;
s->rtpoll_item = NULL;
s->intended_latency = LATENCY_USEC;
- s->smoother = pa_smoother_new(PA_USEC_PER_SEC*5, PA_USEC_PER_SEC*2, TRUE, 10);
- pa_smoother_set_time_offset(s->smoother, pa_timeval_load(&now));
+ s->smoother = pa_smoother_new(
+ PA_USEC_PER_SEC*5,
+ PA_USEC_PER_SEC*2,
+ TRUE,
+ TRUE,
+ 10,
+ pa_timeval_load(&now),
+ FALSE);
s->last_rate_update = pa_timeval_load(&now);
pa_atomic_store(&s->timestamp, (int) now.tv_sec);