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
7e0739c6
Commit
7e0739c6
authored
Sep 27, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect EOF for datagram connection
parent
b6d069b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
modules/access/udp.c
modules/access/udp.c
+13
-3
No files found.
modules/access/udp.c
View file @
7e0739c6
...
...
@@ -109,7 +109,7 @@ struct access_sys_t
{
int
fd
;
vlc_bool_t
b_framed_rtp
;
vlc_bool_t
b_framed_rtp
,
b_comedia
;
/* reorder rtp packets when out-of-sequence */
uint16_t
i_last_seqno
;
...
...
@@ -223,7 +223,7 @@ static int Open( vlc_object_t *p_this )
case
IPPROTO_TCP
:
p_sys
->
fd
=
net_ConnectTCP
(
p_access
,
psz_server_addr
,
i_server_port
);
p_access
->
pf_block
=
BlockRTP
;
p_sys
->
b_framed_rtp
=
VLC_TRUE
;
p_sys
->
b_
comedia
=
p_sys
->
b_
framed_rtp
=
VLC_TRUE
;
break
;
case
IPPROTO_DCCP
:
...
...
@@ -234,6 +234,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
fd
=
-
1
;
msg_Err
(
p_access
,
"DCCP support not compiled-in!"
);
#endif
p_sys
->
b_comedia
=
VLC_TRUE
;
break
;
}
free
(
psz_name
);
...
...
@@ -325,12 +326,21 @@ static block_t *BlockUDP( access_t *p_access )
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
block_t
*
p_block
;
if
(
p_access
->
info
.
b_eof
)
return
NULL
;
/* Read data */
p_block
=
block_New
(
p_access
,
MTU
);
p_block
->
i_buffer
=
net_Read
(
p_access
,
p_sys
->
fd
,
NULL
,
p_block
->
p_buffer
,
MTU
,
VLC_FALSE
);
if
(
p_block
->
i_buffer
<
0
)
if
(
(
p_block
->
i_buffer
<
0
)
||
(
p_sys
->
b_comedia
&&
(
p_block
->
i_buffer
==
0
)
)
)
{
if
(
p_sys
->
b_comedia
)
{
p_access
->
info
.
b_eof
=
VLC_TRUE
;
msg_Dbg
(
p_access
,
"connection-oriented media hangup"
);
}
block_Release
(
p_block
);
return
NULL
;
}
...
...
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