mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
poll: don't call WSAWaitForMultipleEvents with no events
Fixes error caught by Microsoft Application Verifier.
This commit is contained in:
parent
e1ac508cab
commit
d0d27e83fe
1 changed files with 7 additions and 2 deletions
|
@ -1375,8 +1375,13 @@ gst_poll_wait (GstPoll * set, GstClockTime timeout)
|
|||
t = 0;
|
||||
}
|
||||
|
||||
wait_ret = WSAWaitForMultipleEvents (set->active_events->len,
|
||||
(HANDLE *) set->active_events->data, FALSE, t, FALSE);
|
||||
if (set->active_events->len != 0) {
|
||||
wait_ret = WSAWaitForMultipleEvents (set->active_events->len,
|
||||
(HANDLE *) set->active_events->data, FALSE, t, FALSE);
|
||||
} else {
|
||||
wait_ret = WSA_WAIT_FAILED;
|
||||
WSASetLastError (WSA_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
if (ignore_count == 0 && wait_ret == WSA_WAIT_TIMEOUT) {
|
||||
res = 0;
|
||||
|
|
Loading…
Reference in a new issue