[vlc-devel] [PATCH] input: Fill psz_location
Rémi Denis-Courmont
remi at remlab.net
Mon Feb 11 16:29:20 CET 2019
Le maanantaina 11. helmikuuta 2019, 17.08.27 EET Hugo Beauzée-Luyssen a écrit
:
> While I'm not sure if psz_location being NULL when using
> vlc_stream_NewURL is by design, I can't find logic relying on it.
> ---
> src/input/access.c | 3 +++
> src/input/stream_filter.c | 4 ++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/src/input/access.c b/src/input/access.c
> index b4f1531ff6..1ddf82ec0c 100644
> --- a/src/input/access.c
> +++ b/src/input/access.c
> @@ -319,6 +319,9 @@ stream_t *stream_AccessNew(vlc_object_t *parent,
> input_thread_t *input, vlc_stream_Delete(access);
> return NULL;
> }
> + const char *p = strstr(s->psz_url, "://");
> + assert(p != NULL);
> + s->psz_location = p + 3;
I don't think that the assertion is valid. And that's kind of the problem with
psz_location.
> if (access->pf_block != NULL)
> s->pf_block = AStreamReadBlock;
> diff --git a/src/input/stream_filter.c b/src/input/stream_filter.c
> index b18eefa4ad..65f243fe31 100644
> --- a/src/input/stream_filter.c
> +++ b/src/input/stream_filter.c
> @@ -69,6 +69,10 @@ stream_t *vlc_stream_FilterNew( stream_t *p_source,
>
> if( p_source->psz_filepath != NULL )
> s->psz_filepath = strdup( p_source->psz_filepath );
> +
> + const char *p = strstr(s->psz_url, "://");
> + assert(p != NULL);
> + s->psz_location = p + 3;
> }
> s->s = p_source;
--
雷米‧德尼-库尔蒙
http://www.remlab.net/
More information about the vlc-devel
mailing list