[vlc-devel] [PATCH 1/2] dash: set segment url relative if url is not valid

Hugo Beauzée-Luyssen beauze.h at gmail.com
Wed Feb 22 11:19:16 CET 2012


On Mon, Feb 20, 2012 at 7:17 PM,  <Christopher at mailsrv.uni-klu.ac.at> wrote:
> From: Christopher Mueller <christopher.mueller at itec.aau.at>
>
> ---
>  modules/stream_filter/dash/http/HTTPConnection.cpp |   12 ++++++++++--
>  modules/stream_filter/dash/http/HTTPConnection.h   |    1 +
>  2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/modules/stream_filter/dash/http/HTTPConnection.cpp b/modules/stream_filter/dash/http/HTTPConnection.cpp
> index f98c9c7..951df6f 100644
> --- a/modules/stream_filter/dash/http/HTTPConnection.cpp
> +++ b/modules/stream_filter/dash/http/HTTPConnection.cpp
> @@ -74,8 +74,16 @@ int             HTTPConnection::peek            (const uint8_t **pp_peek, size_t
>  }
>  void            HTTPConnection::parseURL        ()
>  {
> -    this->hostname = this->url;
> -    this->hostname.erase(0, 7);
> +    if(this->url.compare(0, 4, "http"))
> +    {
> +        this->hostname = Helper::combinePaths(Helper::getDirectoryPath(stream->psz_path), this->url);
> +    }
> +    else
> +    {
> +        this->hostname = this->url;
> +        this->hostname.erase(0, 7);
> +    }
> +
>     this->path = this->hostname;
>
>     size_t pos = this->hostname.find("/");
> diff --git a/modules/stream_filter/dash/http/HTTPConnection.h b/modules/stream_filter/dash/http/HTTPConnection.h
> index 7cb97a0..978ff2e 100644
> --- a/modules/stream_filter/dash/http/HTTPConnection.h
> +++ b/modules/stream_filter/dash/http/HTTPConnection.h
> @@ -37,6 +37,7 @@
>
>  #include "http/IHTTPConnection.h"
>  #include "http/Chunk.h"
> +#include "Helper.h"
>
>  #define PEEKBUFFER 4096
>
> --
> 1.7.0.4
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel

Applied,

Best regards,

-- 
Hugo Beauzée-Luyssen



More information about the vlc-devel mailing list