Commit f10b0025 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fixes

parent c07085a9
...@@ -144,17 +144,12 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv, ...@@ -144,17 +144,12 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
do do
{ {
if (waitall && (buflen == 0)) if (buflen == 0)
return total; // output buffer full return total; // output buffer full
int delay_ms; int delay_ms = 500;
if (wait_ms != -1) if ((wait_ms != -1) && (wait_ms < 500))
{ delay_ms = wait_ms;
delay_ms = (wait_ms > 500) ? 500 : wait_ms;
wait_ms -= delay_ms;
}
else
delay_ms = 500;
#ifdef HAVE_POLL #ifdef HAVE_POLL
struct pollfd ufd[fdc]; struct pollfd ufd[fdc];
...@@ -258,6 +253,14 @@ receive: ...@@ -258,6 +253,14 @@ receive:
total += n; total += n;
buf += n; buf += n;
buflen -= n; buflen -= n;
if (wait_ms == -1)
{
if (!waitall)
return total;
}
else
wait_ms -= delay_ms;
} }
while (wait_ms); while (wait_ms);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment