[vlc-devel] [PATCH] V4L2: Allow device to be specified with option.

Rémi Denis-Courmont remi at remlab.net
Wed Apr 20 13:41:52 CEST 2011


   Hello,

On Wednesday 20 April 2011, Thierry Reding wrote:
> @@ -1001,8 +1002,13 @@ static void ParseMRL( demux_sys_t *p_sys, char
> *psz_path, vlc_object_t *p_obj )
> 
>      /* Main device */
>      if( *psz_dup )
> +    {
> +        if( p_sys->psz_device )

That if() is totally redumdant.

> +            free( p_sys->psz_device );
> +
>          p_sys->psz_device = strdup( psz_dup );
> -    else
> +    }
> +    else if( p_sys->psz_device == NULL )
>          p_sys->psz_device = strdup( V4L2_DEFAULT );
>      free( psz_dup );
>  }
-- 
Rémi Denis-Courmont
http://www.remlab.info



More information about the vlc-devel mailing list