Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
d16c1ff9
Commit
d16c1ff9
authored
Jul 17, 2004
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fallback for UDP if not using IPv4
parent
87c11234
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
modules/access/mms/mmstu.c
modules/access/mms/mmstu.c
+9
-3
No files found.
modules/access/mms/mmstu.c
View file @
d16c1ff9
...
...
@@ -459,8 +459,8 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
/* *** Bind port if UDP protocol is selected *** */
if
(
b_udp
)
{
struct
sockaddr_
in
name
;
socklen_t
i_namelen
=
sizeof
(
struct
sockaddr_in
);
struct
sockaddr_
storage
name
;
socklen_t
i_namelen
=
sizeof
(
name
);
if
(
getsockname
(
p_sys
->
i_handle_tcp
,
(
struct
sockaddr
*
)
&
name
,
&
i_namelen
)
<
0
)
...
...
@@ -468,7 +468,13 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
net_Close
(
p_sys
->
i_handle_tcp
);
return
VLC_EGENERIC
;
}
p_sys
->
psz_bind_addr
=
inet_ntoa
(
name
.
sin_addr
);
/* FIXME: not thread-safe for IPv4 */
/* FIXME: not sure if it works fine for IPv6 */
if
(
name
.
ss_family
==
AF_INET
)
p_sys
->
psz_bind_addr
=
inet_ntoa
(
((
struct
sockaddr_in
*
)
&
name
)
->
sin_addr
);
else
p_sys
->
psz_bind_addr
=
p_url
->
psz_host
;
p_sys
->
i_handle_udp
=
net_OpenUDP
(
p_access
,
p_sys
->
psz_bind_addr
,
7000
,
""
,
0
);
if
(
p_sys
->
i_handle_udp
<
0
)
...
...
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