diff options
author | wm4 <wm4@nowhere> | 2018-09-15 19:09:53 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:04 +0200 |
commit | 475f61710e4894788309613c58eafee88d53594a (patch) | |
tree | 35eb370e9fb3d88087fcb6f698bce04f6f660c54 /player/command.c | |
parent | adbd035b50aabdef1f401f51a8f1d06d6f3d79d3 (diff) | |
download | mpv-475f61710e4894788309613c58eafee88d53594a.tar.bz2 mpv-475f61710e4894788309613c58eafee88d53594a.tar.xz |
command: report unknown file size as unavailable, not -1
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 71238e4ae1..167ebe539b 100644 --- a/player/command.c +++ b/player/command.c @@ -558,6 +558,8 @@ static int mp_property_file_size(void *ctx, struct m_property *prop, return M_PROPERTY_UNAVAILABLE; int64_t size = mpctx->demuxer->filesize; + if (size < 0) + return M_PROPERTY_UNAVAILABLE; if (action == M_PROPERTY_PRINT) { *(char **)arg = format_file_size(size); |