summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-11 20:34:34 +0100
committerwm4 <wm4@nowhere>2016-01-11 20:34:34 +0100
commitf54ae2031e8d914783c023dc0491c0a5c62a622d (patch)
treee964c12f69e7cf117fbf94b5b57b3a57fab8155e /stream
parent453ea2cb6c4be5142987e218cee609cca22e48f5 (diff)
downloadmpv-f54ae2031e8d914783c023dc0491c0a5c62a622d.tar.bz2
mpv-f54ae2031e8d914783c023dc0491c0a5c62a622d.tar.xz
cache: remove useless return value
It was unused, and also returned the wrong value in some cases.
Diffstat (limited to 'stream')
-rw-r--r--stream/cache.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/stream/cache.c b/stream/cache.c
index c4eaa6e261..1f00fd85c9 100644
--- a/stream/cache.c
+++ b/stream/cache.c
@@ -184,8 +184,7 @@ static size_t read_buffer(struct priv *s, unsigned char *dst,
}
// Runs in the cache thread.
-// Returns true if reading was attempted, and the mutex was shortly unlocked.
-static bool cache_fill(struct priv *s)
+static void cache_fill(struct priv *s)
{
int64_t read = s->read_filepos;
int len = 0;
@@ -236,7 +235,7 @@ static bool cache_fill(struct priv *s)
if (space < FILL_LIMIT) {
s->idle = true;
s->reads++; // don't stuck main thread
- return false;
+ return;
}
// limit to end of buffer (without wrapping)
@@ -278,8 +277,6 @@ done:
}
pthread_cond_signal(&s->wakeup);
-
- return true;
}
// This is called both during init and at runtime.