<html><head></head><body>Well, psz_location is kinda legacy now that we have the complete URL, and it cannot cope with URLs whose colon is not followed by two slashes.<br><br>So I'm not sure we should promote it really.<br><br><div class="gmail_quote">Le 19 février 2019 12:09:10 GMT+02:00, "Hugo Beauzée-Luyssen" <hugo@beauzee.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">While I'm not sure if psz_location being NULL when using<br>vlc_stream_NewURL is by design, I can't find logic relying on it.<hr> src/input/access.c        | 3 +++<br> src/input/stream_filter.c | 4 ++++<br> 2 files changed, 7 insertions(+)<br><br>diff --git a/src/input/access.c b/src/input/access.c<br>index b4f1531ff6..1ddf82ec0c 100644<br>--- a/src/input/access.c<br>+++ b/src/input/access.c<br>@@ -319,6 +319,9 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,<br>             vlc_stream_Delete(access);<br>             return NULL;<br>         }<br>+        const char *p = strstr(s->psz_url, "://");<br>+        assert(p != NULL);<br>+        s->psz_location = p + 3;<br> <br>         if (access->pf_block != NULL)<br>             s->pf_block = AStreamReadBlock;<br>diff --git a/src/input/stream_filter.c b/src/input/stream_filter.c<br>index b18eefa4ad..3c9207d972 100644<br>--- a/src/input/stream_filter.c<br>+++ b/src/input/stream_filter.c<br>@@ -69,6 +69,10 @@ stream_t *vlc_stream_FilterNew( stream_t *p_source,<br> <br>         if( p_source->psz_filepath != NULL )<br>             s->psz_filepath = strdup( p_source->psz_filepath );<br>+<br>+        const char *p = strstr(s->psz_url, "://");<br>+        if( p != NULL )<br>+            s->psz_location = p + 3;<br>     }<br>     s->s = p_source;<br> </pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>