[vlc-devel] [PATCH 2/9] core: make use of the special duration value INPUT_DURATION_ZERO

Steve Lhomme robux4 at ycbcr.xyz
Fri Jul 6 15:01:28 CEST 2018


Instead of a hardcoded value
---
 src/input/item.c    | 4 ++--
 src/playlist/tree.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/input/item.c b/src/input/item.c
index b4731045bf..f488c862dd 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1666,7 +1666,7 @@ static int rdh_unflatten(struct vlc_readdir_helper *p_rdh,
                 psz_subpathname = p_rdh_dir->psz_path;
 
             input_item_t *p_item =
-                input_item_NewExt("vlc://nop", psz_subpathname, VLC_TICK_INVALID,
+                input_item_NewExt("vlc://nop", psz_subpathname, INPUT_DURATION_ZERO,
                                   ITEM_TYPE_DIRECTORY, i_net);
             if (p_item == NULL)
             {
@@ -1806,7 +1806,7 @@ int vlc_readdir_helper_additem(struct vlc_readdir_helper *p_rdh,
             return i_ret;
     }
 
-    input_item_t *p_item = input_item_NewExt(psz_uri, psz_filename, VLC_TICK_INVALID, i_type,
+    input_item_t *p_item = input_item_NewExt(psz_uri, psz_filename, INPUT_DURATION_ZERO, i_type,
                                              i_net);
     if (p_item == NULL)
         return VLC_ENOMEM;
diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index 411b6e202e..bdd0e704d4 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -66,7 +66,7 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
     PL_ASSERT_LOCKED;
     if( !psz_name ) psz_name = _("Undefined");
 
-    p_new_input = input_item_NewExt( NULL, psz_name, VLC_TICK_INVALID, ITEM_TYPE_NODE,
+    p_new_input = input_item_NewExt( NULL, psz_name, INPUT_DURATION_ZERO, ITEM_TYPE_NODE,
                                      ITEM_NET_UNKNOWN );
     if( !p_new_input )
         return NULL;
-- 
2.17.0



More information about the vlc-devel mailing list