From: Thomas Vander Stichele Date: Mon, 10 Oct 2005 17:05:04 +0000 (+0000) Subject: another cast bites the dust X-Git-Tag: RELEASE-0_9_4~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78c180ea287fe3d6ad713b62b405177df2eb0ce9;p=platform%2Fupstream%2Fgstreamer.git another cast bites the dust Original commit message from CVS: another cast bites the dust --- diff --git a/gst/gstutils.c b/gst/gstutils.c index 16b7301..e620991 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -310,8 +310,19 @@ guint64_to_gdouble (guint64 value) else return (gdouble) ((gint64) value); } + +static gdouble +gdouble_to_guint64 (gdouble value) +{ + if (value < (gdouble) 9223372036854775808.) /* 1 << 63 */ + return ((guint64) ((gint64) value)); + + value -= 9223372036854775808.; + return ((guint64) ((gint64) value)) + 1LL << 63; +} #else -#define guint64_to_gdouble(value) ((gdouble) value) +#define gdouble_to_guint64(value) ((guint64) (value)) +#define guint64_to_gdouble(value) ((gdouble) (value)) #endif /**