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
576c05f0
Commit
576c05f0
authored
Feb 04, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32: do not get stuck in poll() with infinite timeout
This really should be fixed more properly.
parent
ce96ee78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
include/vlc_threads.h
include/vlc_threads.h
+11
-7
No files found.
include/vlc_threads.h
View file @
576c05f0
...
...
@@ -388,18 +388,22 @@ struct vlc_cleanup_t
/* poll() with cancellation */
static
inline
int
vlc_poll
(
struct
pollfd
*
fds
,
unsigned
nfds
,
int
timeout
)
{
vlc_testcancel
()
;
int
val
;
while
(
timeout
>
50
)
do
{
int
val
=
poll
(
fds
,
nfds
,
50
);
if
(
val
!=
0
)
return
val
;
timeout
-=
50
;
int
ugly_timeout
=
50
;
if
(
timeout
>=
50
)
timeout
-=
50
;
else
if
((
unsigned
)
timeout
<
50u
)
ugly_timeout
=
timeout
;
vlc_testcancel
();
val
=
poll
(
fds
,
nfds
,
ugly_timeout
);
}
while
(
val
==
0
&&
timeout
!=
0
);
return
poll
(
fds
,
nfds
,
timeout
)
;
return
val
;
}
# define poll(u,n,t) vlc_poll(u, n, t)
...
...
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