Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
1cbd0f6b
Commit
1cbd0f6b
authored
May 16, 2009
by
Rémi Duraffort
Committed by
Jean-Baptiste Kempf
May 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When adding an URL, create the name without login and password.
This fix partially #2142
parent
44d674dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
src/input/item.c
src/input/item.c
+27
-1
No files found.
src/input/item.c
View file @
1cbd0f6b
...
...
@@ -27,6 +27,7 @@
#include <assert.h>
#include <vlc_common.h>
#include <vlc_url.h>
#include "vlc_playlist.h"
#include "vlc_interface.h"
...
...
@@ -367,8 +368,33 @@ void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
p_i
->
psz_name
=
strdup
(
psz_filename
);
}
/* The name is NULL: fill it with everything except login and password */
if
(
!
p_i
->
psz_name
)
p_i
->
psz_name
=
strdup
(
p_i
->
psz_uri
);
{
vlc_url_t
url
;
vlc_UrlParse
(
&
url
,
psz_uri
,
0
);
if
(
url
.
psz_protocol
)
{
if
(
url
.
i_port
>
0
)
asprintf
(
&
p_i
->
psz_name
,
"%s://%s:%d%s"
,
url
.
psz_protocol
,
url
.
psz_host
,
url
.
i_port
,
url
.
psz_path
?
url
.
psz_path
:
""
);
else
asprintf
(
&
p_i
->
psz_name
,
"%s://%s%s"
,
url
.
psz_protocol
,
url
.
psz_host
?
url
.
psz_host
:
""
,
url
.
psz_path
?
url
.
psz_path
:
""
);
}
else
{
if
(
url
.
i_port
>
0
)
asprintf
(
&
p_i
->
psz_name
,
"%s:%d%s"
,
url
.
psz_host
,
url
.
i_port
,
url
.
psz_path
?
url
.
psz_path
:
""
);
else
asprintf
(
&
p_i
->
psz_name
,
"%s%s"
,
url
.
psz_host
,
url
.
psz_path
?
url
.
psz_path
:
""
);
}
vlc_UrlClean
(
&
url
);
}
vlc_mutex_unlock
(
&
p_i
->
lock
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment