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
541441bf
Commit
541441bf
authored
Jul 27, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix segfault when doing RTSP DESCRIBE (trunk-only bug from [11811])
- cleanup net_AddressIsMulticast
parent
ea314b58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
include/network.h
include/network.h
+6
-15
modules/misc/rtsp.c
modules/misc/rtsp.c
+3
-2
No files found.
include/network.h
View file @
541441bf
...
...
@@ -469,41 +469,32 @@ static inline vlc_bool_t net_AddressIsMulticast( vlc_object_t *p_object, char *p
vlc_bool_t
b_multicast
=
VLC_FALSE
;
int
i
;
if
(
psz_addr
==
NULL
)
{
msg_Err
(
p_object
,
"*FIXME* Unexpected NULL URI for net_AddressIsMulticast"
);
msg_Err
(
p_object
,
"This should not happen. VLC needs fixing."
);
return
VLC_FALSE
;
}
memset
(
&
hints
,
0
,
sizeof
(
hints
)
);
hints
.
ai_socktype
=
SOCK_DGRAM
;
/* UDP */
hints
.
ai_flags
=
AI_NUMERICHOST
;
i
=
vlc_getaddrinfo
(
p_object
,
psz_addr
,
0
,
&
hints
,
&
res
);
/*if( i == 0 )
i = vlc_getnameinfo( res->ai_addr, res->ai_addrlen, psz_buf,
sizeof( psz_buf ), NULL, NI_NUMERICHOST );*/
if
(
i
)
{
msg_Err
(
p_object
,
"Invalid node for net_AddressIsMulticast: %s : %s"
,
psz_addr
,
vlc_gai_strerror
(
i
)
);
return
b_multicast
;
return
VLC_FALSE
;
}
if
(
res
->
ai_family
==
AF_INET
)
{
#if !defined( SYS_BEOS )
struct
sockaddr_in
*
v4
=
(
struct
sockaddr_in
*
)
res
->
ai_addr
;
b_multicast
=
(
ntohl
(
v4
->
sin_addr
.
s_addr
)
>=
0xe0000000
&&
ntohl
(
v4
->
sin_addr
.
s_addr
)
<=
0xefffffff
);
b_multicast
=
(
ntohl
(
v4
->
sin_addr
.
s_addr
)
>=
0xe0000000
)
&&
(
ntohl
(
v4
->
sin_addr
.
s_addr
)
<=
0xefffffff
);
#endif
}
else
if
(
res
->
ai_family
==
AF_INET6
)
{
#if defined( WIN32 ) || defined( HAVE_
IF_NAMETOINDEX
)
struct
sockaddr_in6
*
v6
=
(
struct
sockaddr_in6
*
)
res
->
ai_addr
;
b_multicast
=
IN6_IS_ADDR_MULTICAST
(
&
v6
->
sin6_addr
);
#if defined( WIN32 ) || defined( HAVE_
GETADDRINFO
)
struct
sockaddr_in6
*
v6
=
(
struct
sockaddr_in6
*
)
res
->
ai_addr
;
b_multicast
=
IN6_IS_ADDR_MULTICAST
(
&
v6
->
sin6_addr
);
#endif
}
...
...
modules/misc/rtsp.c
View file @
541441bf
...
...
@@ -1018,10 +1018,11 @@ static char *SDPGenerate( vod_media_t *p_media, char *psz_destination )
p
+=
sprintf
(
p
,
"c=IN IP4 %s"
,
psz_destination
?
psz_destination
:
"0.0.0.0"
);
if
(
net_AddressIsMulticast
(
p_media
,
psz_destination
?
psz_destination
:
"0.0.0.0"
)
)
if
(
(
psz_destination
!=
NULL
)
&&
net_AddressIsMulticast
(
p_media
->
p_vod
,
psz_destination
)
)
{
/* Add the ttl if it is a multicast address */
p
+=
sprintf
(
p
,
"/%d
\r\n
"
,
p_media
->
i_ttl
);
p
+=
sprintf
(
p
,
"/%d
\r\n
"
,
p_media
->
i_ttl
);
}
else
{
...
...
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