summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-02 01:32:05 +0200
committerwm4 <wm4@nowhere>2014-07-02 01:32:05 +0200
commit94450bf410ed57eddcc9cf1b90ee6026b102ae54 (patch)
tree4e4d35102f4e66067b00c4dbf69e17a794e4de5f /player
parentb1969c0ebabac517ec2b428cd5374186e461ff10 (diff)
downloadmpv-94450bf410ed57eddcc9cf1b90ee6026b102ae54.tar.bz2
mpv-94450bf410ed57eddcc9cf1b90ee6026b102ae54.tar.xz
command: cache can actually have full-size 0
Then it's simply empty.
Diffstat (limited to 'player')
-rw-r--r--player/command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c
index a2f9e53a79..12a27e66e0 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1147,7 +1147,7 @@ static int mp_property_cache_used(void *ctx, struct m_property *prop,
case M_PROPERTY_GET: {
int64_t size = -1;
stream_control(mpctx->stream, STREAM_CTRL_GET_CACHE_FILL, &size);
- if (size <= 0)
+ if (size < 0)
break;
*(int *)arg = size / 1024;
return M_PROPERTY_OK;
@@ -1162,7 +1162,7 @@ static int mp_property_cache_used(void *ctx, struct m_property *prop,
case M_PROPERTY_PRINT: {
int64_t size = -1;
stream_control(mpctx->stream, STREAM_CTRL_GET_CACHE_FILL, &size);
- if (size <= 0)
+ if (size < 0)
break;
*(char **)arg = format_file_size(size);
return M_PROPERTY_OK;
@@ -1182,7 +1182,7 @@ static int mp_property_cache_free(void *ctx, struct m_property *prop,
case M_PROPERTY_GET: {
int64_t size_used = -1;
stream_control(mpctx->stream, STREAM_CTRL_GET_CACHE_FILL, &size_used);
- if (size_used <= 0)
+ if (size_used < 0)
break;
int64_t size = -1;
@@ -1203,7 +1203,7 @@ static int mp_property_cache_free(void *ctx, struct m_property *prop,
case M_PROPERTY_PRINT: {
int64_t size_used = -1;
stream_control(mpctx->stream, STREAM_CTRL_GET_CACHE_FILL, &size_used);
- if (size_used <= 0)
+ if (size_used < 0)
break;
int64_t size = -1;