module-rtp-source: touch session on RTP

Don't time out while actually running
This commit is contained in:
Dmitry Sharshakov 2023-01-25 20:07:52 +03:00 committed by Wim Taymans
parent c1cf2143b2
commit 7b3d02b7fa

View file

@ -342,6 +342,13 @@ static void stream_io_changed(void *data, uint32_t id, void *area, uint32_t size
}
}
static void session_touch(struct session *sess)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
sess->timestamp = SPA_TIMESPEC_TO_NSEC(&ts);
}
static void
on_rtp_io(void *data, int fd, uint32_t mask)
{
@ -437,6 +444,7 @@ on_rtp_io(void *data, int fd, uint32_t mask)
}
}
}
session_touch(sess);
return;
receive_error:
@ -539,13 +547,6 @@ static uint32_t msec_to_bytes(struct sdp_info *info, uint32_t msec)
return msec * info->stride * info->info.rate / 1000;
}
static void session_touch(struct session *sess)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
sess->timestamp = SPA_TIMESPEC_TO_NSEC(&ts);
}
static void session_free(struct session *sess)
{
if (sess->impl) {