diff --git a/ChangeLog b/ChangeLog index 1bcf4f2243..ea949ff220 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-01-09 Wim Taymans + + Patch by: Peter Kjellerstedt + + * 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 * gst/gstbuffer.c: diff --git a/gst/gstclock.h b/gst/gstclock.h index 3c07d044ce..54cb579ca3 100644 --- a/gst/gstclock.h +++ b/gst/gstclock.h @@ -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