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
81df45be
Commit
81df45be
authored
Aug 10, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_cond_timedwait: fix unlikely Win32 DWORD overflow
parent
b09d329b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
include/vlc_threads.h
include/vlc_threads.h
+11
-6
No files found.
include/vlc_threads.h
View file @
81df45be
...
...
@@ -386,14 +386,19 @@ static inline int __vlc_cond_timedwait( const char * psz_file, int i_line,
(
void
)
psz_file
;
(
void
)
i_line
;
#elif defined( WIN32 )
mtime_t
delay_ms
=
(
deadline
-
mdate
())
/
1000
;
mtime_t
total
=
(
deadline
-
mdate
())
/
1000
;
DWORD
result
;
if
(
delay_ms
<
0
)
delay_ms
=
0
;
if
(
total
<
0
)
total
=
0
;
/* Increase our wait count */
result
=
SignalObjectAndWait
(
*
p_mutex
,
*
p_condvar
,
delay_ms
,
FALSE
);
do
{
DWORD
delay
=
(
total
>
0x7fffffff
)
?
0x7fffffff
:
total
;
result
=
SignalObjectAndWait
(
*
p_mutex
,
*
p_condvar
,
delay
,
FALSE
);
total
-=
delay
;
}
while
(
total
);
/* Reacquire the mutex before returning. */
vlc_mutex_lock
(
p_mutex
);
...
...
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