summaryrefslogtreecommitdiff
path: root/gst/gstclock.h
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2005-10-16 11:48:09 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2005-10-16 11:48:09 +0000
commit9eea358a9ed56752e0bfedfde9b109e9f98283b2 (patch)
tree5aa6c84a21e8a70dcbe4f19efe0c9135b224e5d7 /gst/gstclock.h
parentd9ffe247f687d9723c9d35b36b25e91436b539d7 (diff)
GStreamer consultants will make a lot of money in 2038
Original commit message from CVS: GStreamer consultants will make a lot of money in 2038
Diffstat (limited to 'gst/gstclock.h')
-rw-r--r--gst/gstclock.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/gst/gstclock.h b/gst/gstclock.h
index dd6438dce..9c0728e93 100644
--- a/gst/gstclock.h
+++ b/gst/gstclock.h
@@ -114,17 +114,24 @@ typedef gpointer GstClockID;
* Convert a GTimeVal to a #GstClockTime.
*/
#define GST_TIMEVAL_TO_TIME(tv) ((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
+
/**
* GST_TIME_TO_TIMEVAL:
* @t: The GstClockTime to convert
* @tv: The target timeval
*
+ * Note: on 32-bit systems, a timeval has a range of only 2^32 - 1 seconds,
+ * which is about 68 years. Expect trouble if you want to schedule stuff
+ * in your pipeline for 2038.
+ *
* Convert a GstClockTime to a GTimeVal
*/
-#define GST_TIME_TO_TIMEVAL(t,tv) \
-G_STMT_START { \
- (tv).tv_sec = ((GstClockTime)(t)) / GST_SECOND; \
- (tv).tv_usec = (((GstClockTime)(t)) - (tv).tv_sec * GST_SECOND) / GST_USECOND; \
+#define GST_TIME_TO_TIMEVAL(t,tv) \
+G_STMT_START { \
+ (tv).tv_sec = ((GstClockTime) (t)) / GST_SECOND; \
+ (tv).tv_usec = (((GstClockTime) (t)) - \
+ ((GstClockTime) (tv).tv_sec) * GST_SECOND) \
+ / GST_USECOND; \
} G_STMT_END
/**