mirror of https://github.com/mpv-player/mpv
command: report unknown file size as unavailable, not -1
This commit is contained in:
parent
adbd035b50
commit
475f61710e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue