mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
common: change MP_NOPTS_VALUE definition
Use the exact floating point value, instead of a broken integer constant. The expression calculating the constant probably relied on undefined behavior, because it left-shifts a negative value. This also changes the type of the constant to double, which is perfectly fine, and maybe better than an integer constant.
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
#include "compat/compiler.h"
|
||||
#include "talloc.h"
|
||||
|
||||
// both int64_t and double should be able to represent this exactly
|
||||
#define MP_NOPTS_VALUE (-1LL<<63)
|
||||
// double should be able to represent this exactly
|
||||
#define MP_NOPTS_VALUE (-0x1p+63)
|
||||
|
||||
#define MP_CONCAT_(a, b) a ## b
|
||||
#define MP_CONCAT(a, b) MP_CONCAT_(a, b)
|
||||
|
||||
Reference in New Issue
Block a user