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
63dbcdb8
Commit
63dbcdb8
authored
Jul 06, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP: open the RTCP port
At least, we won't be sending ICMP errors from now.
parent
91467d76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
modules/demux/rtp.c
modules/demux/rtp.c
+10
-2
modules/demux/rtp.h
modules/demux/rtp.h
+1
-0
No files found.
modules/demux/rtp.c
View file @
63dbcdb8
...
@@ -176,7 +176,7 @@ static int Open (vlc_object_t *obj)
...
@@ -176,7 +176,7 @@ static int Open (vlc_object_t *obj)
dport
=
5004
;
/* avt-profile-1 port */
dport
=
5004
;
/* avt-profile-1 port */
/* Try to connect */
/* Try to connect */
int
fd
=
-
1
;
int
fd
=
-
1
,
rtcp_fd
=
-
1
;
switch
(
tp
)
switch
(
tp
)
{
{
...
@@ -184,6 +184,10 @@ static int Open (vlc_object_t *obj)
...
@@ -184,6 +184,10 @@ static int Open (vlc_object_t *obj)
case
IPPROTO_UDPLITE
:
case
IPPROTO_UDPLITE
:
fd
=
net_OpenDgram
(
obj
,
dhost
,
(
dport
+
1
)
&
~
1
,
fd
=
net_OpenDgram
(
obj
,
dhost
,
(
dport
+
1
)
&
~
1
,
shost
,
(
sport
+
1
)
&
~
1
,
AF_UNSPEC
,
tp
);
shost
,
(
sport
+
1
)
&
~
1
,
AF_UNSPEC
,
tp
);
if
(
fd
==
-
1
)
break
;
rtcp_fd
=
net_OpenDgram
(
obj
,
dhost
,
dport
|
1
,
shost
,
sport
?
(
sport
|
1
)
:
0
,
AF_UNSPEC
,
tp
);
break
;
break
;
case
IPPROTO_DCCP
:
case
IPPROTO_DCCP
:
...
@@ -194,7 +198,7 @@ static int Open (vlc_object_t *obj)
...
@@ -194,7 +198,7 @@ static int Open (vlc_object_t *obj)
#endif
#endif
#ifdef SOCK_DCCP
#ifdef SOCK_DCCP
var_Create
(
obj
,
"dccp-service"
,
VLC_VAR_STRING
);
var_Create
(
obj
,
"dccp-service"
,
VLC_VAR_STRING
);
var_SetString
(
obj
,
"dccp-service"
,
"RTPV"
);
var_SetString
(
obj
,
"dccp-service"
,
"RTPV"
);
/* FIXME: RTPA? */
fd
=
net_Connect
(
obj
,
shost
,
(
sport
+
1
)
&
~
1
,
SOCK_DCCP
,
tp
);
fd
=
net_Connect
(
obj
,
shost
,
(
sport
+
1
)
&
~
1
,
SOCK_DCCP
,
tp
);
#else
#else
msg_Err
(
obj
,
"DCCP support not included"
);
msg_Err
(
obj
,
"DCCP support not included"
);
...
@@ -216,6 +220,8 @@ static int Open (vlc_object_t *obj)
...
@@ -216,6 +220,8 @@ static int Open (vlc_object_t *obj)
if
(
p_sys
==
NULL
)
if
(
p_sys
==
NULL
)
{
{
net_Close
(
fd
);
net_Close
(
fd
);
if
(
rtcp_fd
!=
-
1
)
net_Close
(
rtcp_fd
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -279,6 +285,8 @@ static void Close (vlc_object_t *obj)
...
@@ -279,6 +285,8 @@ static void Close (vlc_object_t *obj)
srtp_destroy
(
p_sys
->
srtp
);
srtp_destroy
(
p_sys
->
srtp
);
if
(
p_sys
->
session
)
if
(
p_sys
->
session
)
rtp_session_destroy
(
demux
,
p_sys
->
session
);
rtp_session_destroy
(
demux
,
p_sys
->
session
);
if
(
p_sys
->
rtcp_fd
!=
-
1
)
net_Close
(
p_sys
->
rtcp_fd
);
net_Close
(
p_sys
->
fd
);
net_Close
(
p_sys
->
fd
);
free
(
p_sys
);
free
(
p_sys
);
}
}
...
...
modules/demux/rtp.h
View file @
63dbcdb8
...
@@ -45,6 +45,7 @@ struct demux_sys_t
...
@@ -45,6 +45,7 @@ struct demux_sys_t
rtp_session_t
*
session
;
rtp_session_t
*
session
;
struct
srtp_session_t
*
srtp
;
struct
srtp_session_t
*
srtp
;
int
fd
;
int
fd
;
int
rtcp_fd
;
unsigned
caching
;
unsigned
caching
;
unsigned
timeout
;
unsigned
timeout
;
...
...
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