diff options
Diffstat (limited to 'modules/rst')
-rw-r--r-- | modules/rst/video.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/rst/video.c b/modules/rst/video.c index bf59daf..c12ca0a 100644 --- a/modules/rst/video.c +++ b/modules/rst/video.c @@ -62,6 +62,8 @@ static void *video_thread(void *arg) while (st->run) { + uint64_t timestamp; + sys_msleep(4); now = tmr_jiffies(); @@ -69,8 +71,10 @@ static void *video_thread(void *arg) if (ts > now) continue; + timestamp = ts * VIDEO_TIMEBASE / 1000; + pthread_mutex_lock(&st->mutex); - st->frameh(st->frame, st->arg); + st->frameh(st->frame, timestamp, st->arg); pthread_mutex_unlock(&st->mutex); ts += 1000/st->prm.fps; |