[vlc-devel] commit: Elide a bit of code that looks dead. There looks to be a memory leak, too. (JP Dinger )

Rémi Denis-Courmont remi at remlab.net
Fri May 22 13:47:54 CEST 2009


On Fri, 22 May 2009 11:11:01 +0200 (CEST), git at videolan.org (git version
control) wrote:
> vlc | branch: master | JP Dinger <jpd at videolan.org> | Fri May 22 11:08:16
> 2009 +0200| [8018c67dc1970cf2536a3fd1f93e92c7a9dc9d07] | committer: JP
> Dinger
> 
> Elide a bit of code that looks dead. There looks to be a memory leak,
too.

Mind you, I think the alpha filter is completely useless if you don't load
the mask. I don't know the alpha mask filter, but a little bit of
thinking...

>  modules/video_filter/alphamask.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/modules/video_filter/alphamask.c
> b/modules/video_filter/alphamask.c
> index b9ddcd9..c65cb6b 100644
> --- a/modules/video_filter/alphamask.c
> +++ b/modules/video_filter/alphamask.c
> @@ -87,7 +87,7 @@ static int Create( vlc_object_t *p_this )
>  {
>      filter_t *p_filter = (filter_t *)p_this;
>      filter_sys_t *p_sys;
> -    char *psz_string;
> +    char *psz_string = NULL;
> 
>      if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVA )
>      {
> @@ -108,6 +108,7 @@ static int Create( vlc_object_t *p_this )
>                         p_filter->p_cfg );
> 
>      p_sys->p_mask = NULL;
> +#if 0 /* This appears to be dead code. Where is psz_string initialized?
> */
>      if( psz_string && *psz_string )
>      {
>          LoadMask( p_filter, psz_string );
> @@ -116,6 +117,7 @@ static int Create( vlc_object_t *p_this )
>                       psz_string );
>      }
>      free( psz_string );
> +#endif
> 
>      vlc_mutex_init( &p_sys->mask_lock );
>      psz_string =

Here. Code got swapped during the callback race fixes.

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list