Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a68b3396
Commit
a68b3396
authored
Nov 26, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shout: default to port 8000, try to improve URL parsing (untested)
parent
bc5318a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
15 deletions
+37
-15
modules/access_output/shout.c
modules/access_output/shout.c
+37
-15
No files found.
modules/access_output/shout.c
View file @
a68b3396
...
...
@@ -196,21 +196,43 @@ static int Open( vlc_object_t *p_this )
return
VLC_ENOMEM
;
/* Parse connection data user:pwd@host:port/mountpoint */
psz_user
=
psz_parser
;
while
(
psz_parser
[
0
]
&&
psz_parser
[
0
]
!=
':'
)
psz_parser
++
;
if
(
psz_parser
[
0
]
)
{
psz_parser
[
0
]
=
0
;
psz_parser
++
;
}
psz_pass
=
psz_parser
;
while
(
psz_parser
[
0
]
&&
psz_parser
[
0
]
!=
'@'
)
psz_parser
++
;
if
(
psz_parser
[
0
]
)
{
psz_parser
[
0
]
=
0
;
psz_parser
++
;
}
psz_host
=
psz_parser
;
while
(
psz_parser
[
0
]
&&
psz_parser
[
0
]
!=
':'
)
psz_parser
++
;
if
(
psz_parser
[
0
]
)
{
psz_parser
[
0
]
=
0
;
psz_parser
++
;
}
psz_port
=
psz_parser
;
while
(
psz_parser
[
0
]
&&
psz_parser
[
0
]
!=
'/'
)
psz_parser
++
;
if
(
psz_parser
[
0
]
)
{
psz_parser
[
0
]
=
0
;
psz_parser
++
;
}
psz_mount
=
psz_parser
;
i_port
=
atoi
(
psz_port
);
psz_host
=
strchr
(
psz_parser
,
'@'
);
if
(
psz_host
)
{
psz_user
=
psz_parser
;
*
(
psz_host
++
)
=
'\0'
;
}
else
psz_user
=
""
;
psz_pass
=
strchr
(
psz_user
,
':'
);
if
(
psz_pass
)
*
(
psz_pass
++
)
=
'\0'
;
else
psz_pass
=
""
;
psz_mount
=
strchr
(
psz_host
,
'/'
);
if
(
psz_mount
)
*
(
psz_mount
++
)
=
'\0'
;
else
psz_mount
=
""
;
if
(
psz_host
[
0
]
==
'['
)
{
psz_port
=
strstr
(
psz_host
,
"]:"
);
if
(
psz_port
)
{
*
psz_port
=
'\0'
;
psz_port
+=
2
;
}
}
else
{
psz_port
=
strchr
(
psz_host
,
':'
);
if
(
psz_port
)
*
(
psz_port
++
)
=
'\0'
;
}
i_port
=
psz_port
?
atoi
(
psz_port
)
:
8000
;
p_sys
=
p_access
->
p_sys
=
malloc
(
sizeof
(
sout_access_out_sys_t
)
);
if
(
!
p_sys
)
...
...
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