[vlc-devel] [vlc-commits] playlist: remove no-op pf_deactivate functions

Rafaël Carré funman at videolan.org
Thu Mar 29 22:17:40 CEST 2012


Le 2012-03-29 13:50, Rémi Denis-Courmont a écrit :
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar 29 20:44:02 2012 +0300| [163b142d90bfc454bae7bb43fb486ad3868acd4f] | committer: Rémi Denis-Courmont
> 
> playlist: remove no-op pf_deactivate functions
> 
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=163b142d90bfc454bae7bb43fb486ad3868acd4f
> ---
> 
>  modules/demux/playlist/b4s.c       |   20 ++++++++------------
>  modules/demux/playlist/dvb.c       |    8 --------
>  modules/demux/playlist/ifo.c       |    8 --------
>  modules/demux/playlist/playlist.c  |   14 +++++++-------
>  modules/demux/playlist/playlist.h  |    5 -----
>  modules/demux/playlist/podcast.c   |    8 --------
>  modules/demux/playlist/qtl.c       |    8 --------
>  modules/demux/playlist/shoutcast.c |    8 --------
>  8 files changed, 15 insertions(+), 64 deletions(-)
> 
> diff --git a/modules/demux/playlist/b4s.c b/modules/demux/playlist/b4s.c
> index cbf7beb..801dfb8 100644
> --- a/modules/demux/playlist/b4s.c
> +++ b/modules/demux/playlist/b4s.c
> @@ -51,20 +51,16 @@ static bool IsWhitespace( const char *psz_string );
>   *****************************************************************************/
>  int Import_B4S( vlc_object_t *p_this )
>  {
> -    DEMUX_BY_EXTENSION_OR_FORCED_MSG( ".b4s", "b4s-open",
> -                                      "using B4S playlist reader" );
> -    return VLC_SUCCESS;
> -}
> +    demux_t *demux = (demux_t *)p_this;
>  
> -/*****************************************************************************
> - * Deactivate: frees unused data
> - *****************************************************************************/
> -void Close_B4S( vlc_object_t *p_this )
> -{
> -    demux_t *p_demux = (demux_t *)p_this;
> -    demux_sys_t *p_sys = p_demux->p_sys;
> +    if( !demux_IsPathExtension( demux, ".b4s" )
> +     && !demux_IsForced( demux, "b4s-open" ) )
> +        return VLC_EGENERIC;
> +
> +    demux->pf_demux = Demux;
> +    demux->pf_control = Control;
>  
> -    free( p_sys );

Where is that free() done now?

> +    return VLC_SUCCESS;
>  }



More information about the vlc-devel mailing list