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
0545e3f0
Commit
0545e3f0
authored
Dec 02, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix socket hang-up detection
parent
3df9e798
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/access/rtp/input.c
modules/access/rtp/input.c
+7
-2
No files found.
modules/access/rtp/input.c
View file @
0545e3f0
...
...
@@ -37,6 +37,12 @@
#include "rtp.h"
#include <srtp.h>
static
bool
fd_dead
(
int
fd
)
{
struct
pollfd
ufd
=
{
.
fd
=
fd
,
};
return
(
poll
(
&
ufd
,
1
,
0
)
>
0
)
&&
(
ufd
.
revents
&
POLLHUP
);
}
/**
* Gets a datagram from the network.
* @param fd datagram file descriptor
...
...
@@ -54,8 +60,7 @@ static block_t *rtp_dgram_recv (vlc_object_t *obj, int fd)
block
->
p_buffer
,
block
->
i_buffer
,
false
);
vlc_cleanup_pop
();
if
(((
len
<=
0
)
&&
poll
(
&
(
struct
pollfd
){
.
fd
=
fd
,
},
1
,
0
))
||
!
vlc_object_alive
(
obj
))
if
(((
len
<=
0
)
&&
fd_dead
(
fd
))
||
!
vlc_object_alive
(
obj
))
{
/* POLLHUP -> permanent (DCCP) socket error */
block_Release
(
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