[vlc-commits] modules: the "file-caching" is always translated to a vlc_tick_t

Steve Lhomme git at videolan.org
Fri Jul 6 10:48:29 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul  6 09:57:46 2018 +0200| [416913eb01c09e1600b2bd76baf3d7e02bbf2d8d] | committer: Steve Lhomme

modules: the "file-caching" is always translated to a vlc_tick_t

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

 modules/access/dcp/dcp.cpp | 2 +-
 modules/access/file.c      | 3 ++-
 modules/access/mtp.c       | 4 ++--
 modules/access/vdr.c       | 4 ++--
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/access/dcp/dcp.cpp b/modules/access/dcp/dcp.cpp
index e0977e0622..7fdd3f3526 100644
--- a/modules/access/dcp/dcp.cpp
+++ b/modules/access/dcp/dcp.cpp
@@ -831,7 +831,7 @@ static int Control( demux_t *p_demux, int query, va_list args )
         case DEMUX_GET_PTS_DELAY:
             pi64 = va_arg( args, int64_t * );
             *pi64 =
-                INT64_C(1000) * var_InheritInteger( p_demux, "file-caching" );
+                VLC_TICK_FROM_MS(var_InheritInteger( p_demux, "file-caching" ));
             return VLC_SUCCESS;
 
 
diff --git a/modules/access/file.c b/modules/access/file.c
index 70a44da47b..74660cf19d 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -345,7 +345,8 @@ static int FileControl( stream_t *p_access, int i_query, va_list args )
                 *pi_64 = VLC_TICK_FROM_MS(
                         var_InheritInteger (p_access, "network-caching") );
             else
-                *pi_64 = var_InheritInteger (p_access, "file-caching") * 1000;
+                *pi_64 = VLC_TICK_FROM_MS(
+                        var_InheritInteger (p_access, "file-caching") );
             break;
 
         case STREAM_SET_PAUSE_STATE:
diff --git a/modules/access/mtp.c b/modules/access/mtp.c
index 453a92ec5f..bdecd7ce2c 100644
--- a/modules/access/mtp.c
+++ b/modules/access/mtp.c
@@ -225,8 +225,8 @@ static int Control( stream_t *p_access, int i_query, va_list args )
 
         case STREAM_GET_PTS_DELAY:
             pi_64 = va_arg( args, int64_t * );
-            *pi_64 = INT64_C(1000)
-                   * var_InheritInteger( p_access, "file-caching" );
+            *pi_64 = VLC_TICK_FROM_MS(
+                   var_InheritInteger( p_access, "file-caching" ) );
             break;
 
         case STREAM_SET_PAUSE_STATE:
diff --git a/modules/access/vdr.c b/modules/access/vdr.c
index 33e570a7f4..e485b8e3d2 100644
--- a/modules/access/vdr.c
+++ b/modules/access/vdr.c
@@ -285,8 +285,8 @@ static int Control( stream_t *p_access, int i_query, va_list args )
 
         case STREAM_GET_PTS_DELAY:
             pi64 = va_arg( args, int64_t * );
-            *pi64 = INT64_C(1000)
-                  * var_InheritInteger( p_access, "file-caching" );
+            *pi64 = VLC_TICK_FROM_MS(
+                  var_InheritInteger( p_access, "file-caching" ) );
             break;
 
         case STREAM_SET_PAUSE_STATE:



More information about the vlc-commits mailing list