gst/gstclock.h: Cast the results from the timeval/spec_to_time macros to what the...
authorPeter Kjellerstedt <pkj@axis.com>
Wed, 9 Jan 2008 12:22:22 +0000 (12:22 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 9 Jan 2008 12:22:22 +0000 (12:22 +0000)
Original commit message from CVS:
Patch by: Peter Kjellerstedt <pkj axis com>
* gst/gstclock.h:
Cast the results from the timeval/spec_to_time macros to what the
docs say it casts to, a GstClockTime. fixes #508175.

ChangeLog
gst/gstclock.h

index 1bcf4f2..ea949ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-01-09  Wim Taymans  <wim.taymans@collabora.co.uk>
 
+       Patch by: Peter Kjellerstedt <pkj axis com>
+
+       * gst/gstclock.h:
+       Cast the results from the timeval/spec_to_time macros to what the
+       docs say it casts to, a GstClockTime. fixes #508175.
+
+2008-01-09  Wim Taymans  <wim.taymans@collabora.co.uk>
+
        * gst/gstbuffer.c:
        Update some comments.
 
index 3c07d04..54cb579 100644 (file)
@@ -157,7 +157,7 @@ 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)
+#define GST_TIMEVAL_TO_TIME(tv)                (GstClockTime)((tv).tv_sec * GST_SECOND + (tv).tv_usec * GST_USECOND)
 
 /**
  * GST_TIME_TO_TIMEVAL:
@@ -184,7 +184,7 @@ G_STMT_START {                                                      \
  *
  * Convert a struct timespec (see man pselect) to a #GstClockTime.
  */
-#define GST_TIMESPEC_TO_TIME(ts)               ((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
+#define GST_TIMESPEC_TO_TIME(ts)       (GstClockTime)((ts).tv_sec * GST_SECOND + (ts).tv_nsec * GST_NSECOND)
 /**
  * GST_TIME_TO_TIMESPEC:
  * @t: The GstClockTime to convert