[vlc-commits] playlist: remove dead code and malloc(0)

Rémi Denis-Courmont git at videolan.org
Mon Feb 16 18:47:54 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb 16 19:33:28 2015 +0200| [dbf34c07c959744491dd02f239e7b69093fe260f] | committer: Rémi Denis-Courmont

playlist: remove dead code and malloc(0)

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

 modules/demux/playlist/asx.c      |   21 ++++-----------------
 modules/demux/playlist/playlist.c |    2 +-
 modules/demux/playlist/playlist.h |    1 -
 3 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c
index 099cc5e..6f6e666 100644
--- a/modules/demux/playlist/asx.c
+++ b/modules/demux/playlist/asx.c
@@ -41,10 +41,6 @@
 
 #include "playlist.h"
 
-struct demux_sys_t
-{
-};
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -158,23 +154,14 @@ int Import_ASX( vlc_object_t *p_this )
         ) ||
         demux_IsForced( p_demux, "asx-open" ) )
     {
-        STANDARD_DEMUX_INIT_MSG( "found valid ASX playlist" );
-        return VLC_SUCCESS;
+        msg_Dbg( p_demux, "found valid ASX playlist" );
     }
     else
         return VLC_EGENERIC;
-}
-
-/*****************************************************************************
- * Deactivate: frees unused data
- *****************************************************************************/
-
-void Close_ASX( vlc_object_t *p_this )
-{
-    demux_t *p_demux = (demux_t *)p_this;
-    demux_sys_t *p_sys = p_demux->p_sys;
 
-    free( p_sys );
+    p_demux->pf_control = Control;
+    p_demux->pf_demux = Demux;
+    return VLC_SUCCESS;
 }
 
 static void ProcessEntry( int *pi_n_entry, xml_reader_t *p_xml_reader,
diff --git a/modules/demux/playlist/playlist.c b/modules/demux/playlist/playlist.c
index 4b25dd3..f50d8b5 100644
--- a/modules/demux/playlist/playlist.c
+++ b/modules/demux/playlist/playlist.c
@@ -109,7 +109,7 @@ vlc_module_begin ()
         set_description( N_("ASX playlist import") )
         add_shortcut( "playlist", "asx-open" )
         set_capability( "demux", 10 )
-        set_callbacks( Import_ASX, Close_ASX )
+        set_callbacks( Import_ASX, NULL )
     add_submodule ()
         set_description( N_("Kasenna MediaBase parser") )
         add_shortcut( "playlist", "sgimb" )
diff --git a/modules/demux/playlist/playlist.h b/modules/demux/playlist/playlist.h
index c1230cf..052e7c5 100644
--- a/modules/demux/playlist/playlist.h
+++ b/modules/demux/playlist/playlist.h
@@ -53,7 +53,6 @@ void Close_xspf ( vlc_object_t * );
 int Import_Shoutcast ( vlc_object_t * );
 
 int Import_ASX ( vlc_object_t * );
-void Close_ASX ( vlc_object_t * );
 
 int Import_SGIMB ( vlc_object_t * );
 void Close_SGIMB ( vlc_object_t * );



More information about the vlc-commits mailing list