gst/gstclock.h: Cast the results from the timeval/spec_to_time macros to what the docs say it casts to, a GstClockTim...

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.
This commit is contained in:
Peter Kjellerstedt 2008-01-09 12:22:22 +00:00 committed by Wim Taymans
parent c7d40b0a25
commit b85b7ff0cf
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,11 @@
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> 2008-01-09 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstbuffer.c: * gst/gstbuffer.c:

View file

@ -157,7 +157,7 @@ typedef gpointer GstClockID;
* *
* Convert a GTimeVal to a #GstClockTime. * 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: * GST_TIME_TO_TIMEVAL:
@ -184,7 +184,7 @@ G_STMT_START { \
* *
* Convert a struct timespec (see man pselect) to a #GstClockTime. * 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: * GST_TIME_TO_TIMESPEC:
* @t: The GstClockTime to convert * @t: The GstClockTime to convert