Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ea714093
Commit
ea714093
authored
Feb 10, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bunch of bugs
parent
7ee198c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/stream_output/sdp.c
src/stream_output/sdp.c
+8
-4
No files found.
src/stream_output/sdp.c
View file @
ea714093
...
@@ -34,6 +34,10 @@
...
@@ -34,6 +34,10 @@
static
static
char
*
AddressToSDP
(
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
,
char
*
buf
)
char
*
AddressToSDP
(
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
,
char
*
buf
)
{
{
if
(
addrlen
<
offsetof
(
struct
sockaddr
,
sa_family
)
+
sizeof
(
addr
->
sa_family
))
return
NULL
;
const
char
*
ttl
=
NULL
;
const
char
*
ttl
=
NULL
;
strcpy
(
buf
,
"IN IP* "
);
strcpy
(
buf
,
"IN IP* "
);
...
@@ -57,7 +61,7 @@ char *AddressToSDP (const struct sockaddr *addr, socklen_t addrlen, char *buf)
...
@@ -57,7 +61,7 @@ char *AddressToSDP (const struct sockaddr *addr, socklen_t addrlen, char *buf)
return
NULL
;
return
NULL
;
}
}
if
(
vlc_getnameinfo
(
addr
,
addrlen
,
buf
+
4
,
MAXSDPADDRESS
-
4
,
NULL
,
if
(
vlc_getnameinfo
(
addr
,
addrlen
,
buf
+
7
,
MAXSDPADDRESS
-
7
,
NULL
,
NI_NUMERICHOST
))
NI_NUMERICHOST
))
return
NULL
;
return
NULL
;
...
@@ -102,8 +106,8 @@ char *StartSDP (const char *name, const char *description, const char *url,
...
@@ -102,8 +106,8 @@ char *StartSDP (const char *name, const char *description, const char *url,
if
(
!
IsSDPString
(
name
)
||
!
IsSDPString
(
description
)
if
(
!
IsSDPString
(
name
)
||
!
IsSDPString
(
description
)
||
!
IsSDPString
(
url
)
||
!
IsSDPString
(
email
)
||
!
IsSDPString
(
phone
)
||
!
IsSDPString
(
url
)
||
!
IsSDPString
(
email
)
||
!
IsSDPString
(
phone
)
||
(
AddressToSDP
((
struct
sockaddr
*
)
&
orig
,
origlen
,
machine
)
==
NULL
)
||
(
AddressToSDP
((
struct
sockaddr
*
)
orig
,
origlen
,
machine
)
==
NULL
)
||
(
AddressToSDP
((
struct
sockaddr
*
)
&
addr
,
addrlen
,
conn
)
==
NULL
))
||
(
AddressToSDP
((
struct
sockaddr
*
)
addr
,
addrlen
,
conn
)
==
NULL
))
return
NULL
;
return
NULL
;
if
(
asprintf
(
&
sdp
,
"v=0"
if
(
asprintf
(
&
sdp
,
"v=0"
...
@@ -115,7 +119,7 @@ char *StartSDP (const char *name, const char *description, const char *url,
...
@@ -115,7 +119,7 @@ char *StartSDP (const char *name, const char *description, const char *url,
"%s%s"
// optional phone number
"%s%s"
// optional phone number
"
\r\n
c=%s"
"
\r\n
c=%s"
// bandwidth not specified
// bandwidth not specified
"
\r\n
t=
0 0"
// one dummy time span
"
\r\n
t=0 0"
// one dummy time span
// no repeating
// no repeating
// no time zone adjustment (silly idea anyway)
// no time zone adjustment (silly idea anyway)
// no encryption key (deprecated)
// no encryption key (deprecated)
...
...
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