[vlc-commits] v4l: use vlc_tick_from_timeval() for timeval conversion

Steve Lhomme git at videolan.org
Wed Jul 4 10:39:23 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jul  4 10:29:35 2018 +0200| [c888af4920956e53c9c0989bdc75daa648bcdda6] | committer: Steve Lhomme

v4l: use vlc_tick_from_timeval() for timeval conversion

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c888af4920956e53c9c0989bdc75daa648bcdda6
---

 modules/access/v4l2/video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c
index d757111d56..7b0c86add4 100644
--- a/modules/access/v4l2/video.c
+++ b/modules/access/v4l2/video.c
@@ -567,8 +567,7 @@ vlc_tick_t GetBufferPTS (const struct v4l2_buffer *buf)
     switch (buf->flags & V4L2_BUF_FLAG_TIMESTAMP_MASK)
     {
         case V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC:
-            pts = vlc_tick_from_sec( buf->timestamp.tv_sec )
-                 + VLC_TICK_FROM_US( buf->timestamp.tv_usec );
+            pts = vlc_tick_from_timeval( &buf->timestamp );
             static_assert (CLOCK_FREQ == 1000000, "Clock unit mismatch");
             break;
         case V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN:



More information about the vlc-commits mailing list