mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Improve TIMESPEC_TO_TIME
Add explicit TO_NSEC and TO_USEC versions to make it clearer and to allow for some optimizations.
This commit is contained in:
parent
bf6843743a
commit
088ee9f09e
8 changed files with 20 additions and 18 deletions
|
|
@ -1157,7 +1157,7 @@ static int mmap_read(struct impl *this)
|
|||
if (xioctl(port->fd, VIDIOC_DQBUF, &buf) < 0)
|
||||
return -errno;
|
||||
|
||||
pts = SPA_TIMEVAL_TO_TIME(&buf.timestamp);
|
||||
pts = SPA_TIMEVAL_TO_NSEC(&buf.timestamp);
|
||||
|
||||
if (this->clock) {
|
||||
this->clock->nsec = pts;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue