From 475f61710e4894788309613c58eafee88d53594a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 15 Sep 2018 19:09:53 +0200 Subject: command: report unknown file size as unavailable, not -1 --- player/command.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3