[vlc-commits] rtp: parse time in vlc_tick_t instead of int64_t

Steve Lhomme git at videolan.org
Tue Sep 18 17:07:31 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Sat May  5 17:42:39 2018 +0200| [d472d92f8e66457aa9f37cf16cde2d9b90682973] | committer: Steve Lhomme

rtp: parse time in vlc_tick_t instead of int64_t

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

 modules/stream_out/rtp.c  | 4 ++--
 modules/stream_out/rtp.h  | 4 ++--
 modules/stream_out/rtsp.c | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 71e4d8fc0a..3341bde9c5 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1577,7 +1577,7 @@ static vlc_tick_t rtp_init_ts( const vod_media_t *p_media,
  * the first packets for NPT=0 is returned instead. */
 vlc_tick_t rtp_get_ts( const sout_stream_t *p_stream, const sout_stream_id_sys_t *id,
                     const vod_media_t *p_media, const char *psz_vod_session,
-                    int64_t *p_npt )
+                    vlc_tick_t *p_npt )
 {
     if (p_npt != NULL)
         *p_npt = 0;
@@ -1601,7 +1601,7 @@ vlc_tick_t rtp_get_ts( const sout_stream_t *p_stream, const sout_stream_id_sys_t
     if( now < i_npt_zero )
         return p_sys->i_pts_zero;
 
-    int64_t npt = now - i_npt_zero;
+    vlc_tick_t npt = now - i_npt_zero;
     if (p_npt != NULL)
         *p_npt = npt;
 
diff --git a/modules/stream_out/rtp.h b/modules/stream_out/rtp.h
index 6808fa871f..dcbf264b8b 100644
--- a/modules/stream_out/rtp.h
+++ b/modules/stream_out/rtp.h
@@ -101,8 +101,8 @@ void CloseVoD( vlc_object_t * );
 int vod_check_range(vod_media_t *p_media, const char *psz_session,
                     vlc_tick_t start, vlc_tick_t end);
 void vod_play(vod_media_t *p_media, const char *psz_session,
-              int64_t *start, int64_t end);
-void vod_pause(vod_media_t *p_media, const char *psz_session, int64_t *npt);
+              vlc_tick_t *start, vlc_tick_t end);
+void vod_pause(vod_media_t *p_media, const char *psz_session, vlc_tick_t *npt);
 void vod_stop(vod_media_t *p_media, const char *psz_session);
 
 const char *vod_get_mux(const vod_media_t *p_media);
diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c
index aa476dcbc5..61051cc07c 100644
--- a/modules/stream_out/rtsp.c
+++ b/modules/stream_out/rtsp.c
@@ -576,7 +576,7 @@ static inline const char *parameter_next( const char *str )
 }
 
 
-static int64_t ParseNPT (const char *str)
+static vlc_tick_t ParseNPT (const char *str)
 {
     locale_t loc = newlocale (LC_NUMERIC_MASK, "C", NULL);
     locale_t oldloc = uselocale (loc);
@@ -952,7 +952,7 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
             answer->i_status = 200;
 
             psz_session = httpd_MsgGet( query, "Session" );
-            int64_t start = -1, end = -1, npt;
+            vlc_tick_t start = -1, end = -1, npt;
             const char *range = httpd_MsgGet (query, "Range");
             if (range != NULL)
             {
@@ -1129,7 +1129,7 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
             if (ses != NULL && id == NULL)
             {
                 assert(vod);
-                int64_t npt = 0;
+                vlc_tick_t npt = 0;
                 vod_pause(rtsp->vod_media, psz_session, &npt);
                 double f_npt = secf_from_vlc_tick(npt);
                 httpd_MsgAdd( answer, "Range", "npt=%f-", f_npt );



More information about the vlc-commits mailing list