From f73db960777cfd285f557e164818e77553a34499 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Mar 2020 20:43:56 +0100 Subject: client API: fix MPV_FORMAT_DOUBLE => MPV_FORMAT_INT64 (Why can it do this conversion at all? This is shitshow anyway.) --- player/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/player/client.c b/player/client.c index 91c86f4a88..e05fc87303 100644 --- a/player/client.c +++ b/player/client.c @@ -985,7 +985,9 @@ static bool conv_node_to_format(void *dst, mpv_format dst_fmt, mpv_node *src) return true; } if (dst_fmt == MPV_FORMAT_INT64 && src->format == MPV_FORMAT_DOUBLE) { - if (src->u.double_ >= INT64_MIN && src->u.double_ <= INT64_MAX) { + if (src->u.double_ > (double)INT64_MIN && + src->u.double_ < (double)INT64_MAX) + { *(int64_t *)dst = src->u.double_; return true; } -- cgit v1.2.3