[vlc-devel] [PATCH] Playlist demuxer called BITPLS.c.

Ilkka Ollakka ileoo at videolan.org
Fri May 21 11:14:35 CEST 2010


On Thu, May 20, 2010 at 11:49:09AM -0700, Marijn Swenne wrote:
> Functionality is ment to be no different from PLS.c
> Patch is only a personal prove of concept for adding a playlist demuxer.

Hi, seems to be correct concept, but

> ---
> + * Authors: Cl??ment Stenac <zorglub at videolan.org>
> + * Authors: Sigmund Augdal Helberg <dnumgis at videolan.org>

You aren't either one of those...

And these changes should be on different patch, or atleast clear
statement on commit-message about doing something else than adding
playlist-format.

>      /* Simple cases first */
> -    if( !psz_mrl || !*psz_mrl )
> -        return NULL;
> -    if( !psz_prefix || !*psz_prefix )
> -        goto uri;
> +    if( !psz_mrl || !*psz_mrl ) return NULL;
> +    if( !psz_prefix || !*psz_prefix ) return strdup( psz_mrl );

>      /* Check if the line specifies an absolute path */
> -    /* FIXME: that's wrong if the playlist is not a local file */
> -    if( *psz_mrl == DIR_SEP_CHAR )
> -        goto uri;
> -#ifdef WIN32
> -    /* Drive letter (this assumes URL scheme are not a single character) */
> -    if( isalpha(psz_mrl[0]) && psz_mrl[1] == ':' )
> -        goto uri;
> -#endif
> -    if( strstr( psz_mrl, "://" ) )
> -        return strdup( psz_mrl );
> +    if( *psz_mrl == '/' || *psz_mrl == '\\' ) return strdup( psz_mrl );
> +
> +    /* Check if the line specifies an mrl/url
> +     * (and on win32, contains a drive letter) */
> +    if( strchr( psz_mrl, ':' ) ) return strdup( psz_mrl );

>      /* This a relative path, prepend the prefix */
>      char *ret;
> -    char *postfix = encode_URI_component( psz_mrl );
> -    /* FIXME: postfix may not be encoded correctly (esp. slashes) */
> -    if( postfix == NULL
> -     || asprintf( &ret, "%s%s", psz_prefix, postfix ) == -1 )
> +    if( asprintf( &ret, "%s%s", psz_prefix, psz_mrl ) == -1 )
>          ret = NULL;
> -    free( postfix );
>      return ret;
> -
> -uri:
> -    return make_URI( psz_mrl );
>  }

-- 
Ilkka Ollakka
//GO.SYSIN DD *, DOODAH, DOODAH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100521/10d02aa9/attachment.sig>


More information about the vlc-devel mailing list