mirror of https://github.com/mpv-player/mpv
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:
parent
5fd8660f5f
commit
b41ece5ad4
|
@ -352,7 +352,7 @@ static int mp_property_length(void *ctx, struct m_property *prop,
|
|||
MPContext *mpctx = ctx;
|
||||
double len;
|
||||
|
||||
if (!(int) (len = get_time_length(mpctx)))
|
||||
if ((len = get_time_length(mpctx)) <= 0)
|
||||
return M_PROPERTY_UNAVAILABLE;
|
||||
|
||||
return property_time(action, arg, len);
|
||||
|
|
Loading…
Reference in New Issue