1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 15:22:09 +00:00

command: avoid a double -> int cast

Just check against zero directly.

Changes behavior, but that should be ok.

Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
Ben Boeckel 2014-09-15 20:52:58 -04:00 committed by wm4
parent 5fd8660f5f
commit b41ece5ad4

View File

@ -352,7 +352,7 @@ static int mp_property_length(void *ctx, struct m_property *prop,
MPContext *mpctx = ctx; MPContext *mpctx = ctx;
double len; double len;
if (!(int) (len = get_time_length(mpctx))) if ((len = get_time_length(mpctx)) <= 0)
return M_PROPERTY_UNAVAILABLE; return M_PROPERTY_UNAVAILABLE;
return property_time(action, arg, len); return property_time(action, arg, len);