mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
client API: fix MPV_FORMAT_DOUBLE => MPV_FORMAT_INT64
(Why can it do this conversion at all? This is shitshow anyway.)
This commit is contained in:
parent
5a81de59a8
commit
f73db96077
@ -985,7 +985,9 @@ static bool conv_node_to_format(void *dst, mpv_format dst_fmt, mpv_node *src)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (dst_fmt == MPV_FORMAT_INT64 && src->format == MPV_FORMAT_DOUBLE) {
|
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_;
|
*(int64_t *)dst = src->u.double_;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user