Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7d8576c2
Commit
7d8576c2
authored
Oct 31, 2007
by
Luca Abeni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reindent after last commit
Originally committed as revision 10882 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d607861c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
+21
-20
udp.c
libavformat/udp.c
+21
-20
No files found.
libavformat/udp.c
View file @
7d8576c2
...
...
@@ -120,13 +120,14 @@ static struct addrinfo* udp_ipv6_resolve_host(const char *hostname, int port, in
if
((
hostname
)
&&
(
hostname
[
0
]
!=
'\0'
)
&&
(
hostname
[
0
]
!=
'?'
))
{
node
=
hostname
;
}
memset
(
&
hints
,
0
,
sizeof
(
hints
));
hints
.
ai_socktype
=
type
;
hints
.
ai_family
=
family
;
hints
.
ai_flags
=
flags
;
if
((
error
=
getaddrinfo
(
node
,
service
,
&
hints
,
&
res
)))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"udp_ipv6_resolve_host: %s
\n
"
,
gai_strerror
(
error
));
}
memset
(
&
hints
,
0
,
sizeof
(
hints
));
hints
.
ai_socktype
=
type
;
hints
.
ai_family
=
family
;
hints
.
ai_flags
=
flags
;
if
((
error
=
getaddrinfo
(
node
,
service
,
&
hints
,
&
res
)))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"udp_ipv6_resolve_host: %s
\n
"
,
gai_strerror
(
error
));
}
return
res
;
}
...
...
@@ -153,23 +154,23 @@ static int udp_ipv6_set_local(URLContext *h) {
char
hbuf
[
NI_MAXHOST
];
struct
addrinfo
*
res0
=
NULL
,
*
res
=
NULL
;
res0
=
udp_ipv6_resolve_host
(
0
,
s
->
local_port
,
SOCK_DGRAM
,
AF_UNSPEC
,
AI_PASSIVE
);
if
(
res0
==
0
)
goto
fail
;
for
(
res
=
res0
;
res
;
res
=
res
->
ai_next
)
{
udp_fd
=
socket
(
res
->
ai_family
,
SOCK_DGRAM
,
0
);
if
(
udp_fd
>
0
)
break
;
perror
(
"socket"
);
}
res0
=
udp_ipv6_resolve_host
(
0
,
s
->
local_port
,
SOCK_DGRAM
,
AF_UNSPEC
,
AI_PASSIVE
);
if
(
res0
==
0
)
goto
fail
;
for
(
res
=
res0
;
res
;
res
=
res
->
ai_next
)
{
udp_fd
=
socket
(
res
->
ai_family
,
SOCK_DGRAM
,
0
);
if
(
udp_fd
>
0
)
break
;
perror
(
"socket"
);
}
if
(
udp_fd
<
0
)
goto
fail
;
if
(
bind
(
udp_fd
,
res0
->
ai_addr
,
res0
->
ai_addrlen
)
<
0
)
{
perror
(
"bind"
);
goto
fail
;
}
freeaddrinfo
(
res0
);
if
(
bind
(
udp_fd
,
res0
->
ai_addr
,
res0
->
ai_addrlen
)
<
0
)
{
perror
(
"bind"
);
goto
fail
;
}
freeaddrinfo
(
res0
);
res0
=
NULL
;
addrlen
=
sizeof
(
clientaddr
);
...
...
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