Also add a fallback define to math-compat.h.
Fixes #666887
#define rintf(x) __gst_math_compat_rintf(x)
#endif
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+#define __gst_nan_bytes { 0x7f, 0xc0, 0, 0 }
+#endif
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
+#define __gst_nan_bytes { 0, 0, 0xc0, 0x7f }
+#endif
+
+static union {
+ unsigned char __c[4];
+ float __d;
+} __gst_nan_union __attribute_used__ = {
+ __gst_nan_bytes
+};
+
+#ifndef NAN
+#define NAN (__gst_nan_union.__d)
+#endif
+
G_END_DECLS
#endif /* __GST_MATH_COMPAT_H__ */
#include "gstinterpolationcontrolsource.h"
#include "gst/glib-compat-private.h"
-
-#include <math.h>
+#include "gst/math-compat.h"
#define GST_CAT_DEFAULT controller_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
g_mutex_lock (self->lock);
for (i = 0; i < n_values; i++) {
- val = FP_NAN;
+ val = NAN;
if (ts >= next_ts) {
iter1 = gst_timed_value_control_source_find_control_point_iter (self, ts);
if (!iter1) {
g_mutex_lock (self->lock);
for (i = 0; i < n_values; i++) {
- val = FP_NAN;
+ val = NAN;
if (ts >= next_ts) {
cp1 = cp2 = NULL;
iter1 = gst_timed_value_control_source_find_control_point_iter (self, ts);
g_mutex_lock (self->lock);
for (i = 0; i < n_values; i++) {
- val = FP_NAN;
+ val = NAN;
if (ts >= next_ts) {
cp1 = cp2 = NULL;
iter1 = gst_timed_value_control_source_find_control_point_iter (self, ts);
#include "gsttriggercontrolsource.h"
#include "gst/glib-compat-private.h"
-
-#include <math.h>
+#include "gst/math-compat.h"
#define GST_CAT_DEFAULT controller_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
if (found) {
return cp->value;
}
- return FP_NAN;
+ return NAN;
}
static gboolean
g_mutex_lock (self->lock);
for (i = 0; i < n_values; i++) {
- val = FP_NAN;
+ val = NAN;
if (ts >= next_ts) {
iter1 = gst_timed_value_control_source_find_control_point_iter (self, ts);
if (!iter1) {