diff options
author | wm4 <wm4@nowhere> | 2020-03-18 20:43:56 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-03-18 20:43:56 +0100 |
commit | f73db960777cfd285f557e164818e77553a34499 (patch) | |
tree | 37a50571098683725c3a2e482ced6dbe54c3b83f | |
parent | 5a81de59a88f89189d25a44751448622f9139c0d (diff) | |
download | mpv-f73db960777cfd285f557e164818e77553a34499.tar.bz2 mpv-f73db960777cfd285f557e164818e77553a34499.tar.xz |
client API: fix MPV_FORMAT_DOUBLE => MPV_FORMAT_INT64
(Why can it do this conversion at all? This is shitshow anyway.)
-rw-r--r-- | player/client.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |