[vlc-devel] [PATCH] LUA: Remove protocol from vlc.path after redirect

Laurent Aimar fenrir at elivagar.org
Fri Jan 6 00:54:49 CET 2012


On Fri, Jan 06, 2012 at 05:08:20AM +0530, Gaurav Narula wrote:
> ---
>  modules/access/http.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/modules/access/http.c b/modules/access/http.c
> index d32a0a9..deaab84 100644
> --- a/modules/access/http.c
> +++ b/modules/access/http.c
> @@ -581,7 +581,8 @@ connect:
>              goto error;
>          }
>          free( p_access->psz_location );
> -        p_access->psz_location = strdup( p_sys->psz_location );
> +        char *slash = strstr(p_sys->psz_location, "://");
> +        p_access->psz_location = (slash) ? strdup( slash + 3 ) : p_sys->psz_location;
 I am unsure if it can happens here, but I think you should also remove any
anchor part (using input_SplitMRL() might be simpler).

-- 
fenrir



More information about the vlc-devel mailing list