[vlc-commits] vlc_timestamp_helper: use vlc_tick_t instead of uint64_t

Steve Lhomme git at videolan.org
Wed Oct 10 11:23:00 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Oct 10 10:39:52 2018 +0200| [6f634ba5dbdac5dadccf40cad35087c776871eac] | committer: Steve Lhomme

vlc_timestamp_helper: use vlc_tick_t instead of uint64_t

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

 include/vlc_timestamp_helper.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/vlc_timestamp_helper.h b/include/vlc_timestamp_helper.h
index a13bee1e84..2ed5c4d90c 100644
--- a/include/vlc_timestamp_helper.h
+++ b/include/vlc_timestamp_helper.h
@@ -39,7 +39,7 @@ typedef struct
     uint32_t          begin;
     uint32_t          size;
     uint32_t          capacity;
-    int64_t           *buffer;
+    vlc_tick_t        *buffer;
 } timestamp_fifo_t;
 
 static inline timestamp_fifo_t *timestamp_FifoNew(uint32_t capacity)
@@ -77,7 +77,7 @@ static inline void timestamp_FifoEmpty(timestamp_fifo_t *fifo)
     fifo->size = 0;
 }
 
-static inline void timestamp_FifoPut(timestamp_fifo_t *fifo, int64_t ts)
+static inline void timestamp_FifoPut(timestamp_fifo_t *fifo, vlc_tick_t ts)
 {
     uint32_t end = (fifo->begin + fifo->size) % fifo->capacity;
     fifo->buffer[end] = ts;
@@ -87,12 +87,12 @@ static inline void timestamp_FifoPut(timestamp_fifo_t *fifo, int64_t ts)
         fifo->begin = (fifo->begin + 1) % fifo->capacity;
 }
 
-static inline int64_t timestamp_FifoGet(timestamp_fifo_t *fifo)
+static inline vlc_tick_t timestamp_FifoGet(timestamp_fifo_t *fifo)
 {
     if (timestamp_FifoIsEmpty(fifo))
         return VLC_TICK_INVALID;
 
-    int64_t result = fifo->buffer[fifo->begin];
+    vlc_tick_t result = fifo->buffer[fifo->begin];
     fifo->begin = (fifo->begin + 1) % fifo->capacity;
     fifo->size -= 1;
     return result;



More information about the vlc-commits mailing list