[vlc-commits] directory: remove write-only parameter

Rémi Denis-Courmont git at videolan.org
Tue Apr 18 20:40:24 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 17 18:37:26 2017 +0300| [7898afcf8c19afddb83602a8fe3752683bbf6987] | committer: Rémi Denis-Courmont

directory: remove write-only parameter

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

 modules/demux/playlist/directory.c | 15 ++-------------
 modules/demux/playlist/playlist.c  |  2 +-
 modules/demux/playlist/playlist.h  |  1 -
 3 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/modules/demux/playlist/directory.c b/modules/demux/playlist/directory.c
index c74d07a8a9..08da448665 100644
--- a/modules/demux/playlist/directory.c
+++ b/modules/demux/playlist/directory.c
@@ -33,11 +33,6 @@
 
 #include "playlist.h"
 
-struct demux_sys_t
-{
-    bool b_dir_can_loop;
-};
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -52,18 +47,12 @@ int Import_Dir ( vlc_object_t *p_this)
     if( vlc_stream_Control( p_demux->s, STREAM_IS_DIRECTORY, &b_dir_can_loop ) )
         return VLC_EGENERIC;
 
-    STANDARD_DEMUX_INIT_MSG( "reading directory content" );
-    p_demux->p_sys->b_dir_can_loop = b_dir_can_loop;
+    p_demux->pf_demux = Demux;
+    p_demux->pf_control = Control;
 
     return VLC_SUCCESS;
 }
 
-void Close_Dir ( vlc_object_t *p_this )
-{
-    demux_t *p_demux = (demux_t *)p_this;
-    free( p_demux->p_sys );
-}
-
 static int Demux( demux_t *p_demux )
 {
     input_item_t *p_input = GetCurrentItem(p_demux);
diff --git a/modules/demux/playlist/playlist.c b/modules/demux/playlist/playlist.c
index 251680ab59..c31143169b 100644
--- a/modules/demux/playlist/playlist.c
+++ b/modules/demux/playlist/playlist.c
@@ -166,7 +166,7 @@ vlc_module_begin ()
         set_description( N_("Directory import") )
         add_shortcut( "playlist", "directory" )
         set_capability( "demux", 10 )
-        set_callbacks( Import_Dir, Close_Dir )
+        set_callbacks( Import_Dir, NULL )
         add_string( "recursive", "collapse" , RECURSIVE_TEXT,
                     RECURSIVE_LONGTEXT, false )
           change_string_list( psz_recursive_list, psz_recursive_list_text )
diff --git a/modules/demux/playlist/playlist.h b/modules/demux/playlist/playlist.h
index 4e659c7c81..480b134409 100644
--- a/modules/demux/playlist/playlist.h
+++ b/modules/demux/playlist/playlist.h
@@ -73,7 +73,6 @@ int Import_WPL ( vlc_object_t * );
 void Close_WPL ( vlc_object_t * );
 
 int Import_Dir ( vlc_object_t * );
-void Close_Dir ( vlc_object_t * );
 
 
 extern input_item_t * GetCurrentItem(demux_t *p_demux);



More information about the vlc-commits mailing list