gst/gstclock.c: make it compile with gcc 2.95 again.

Original commit message from CVS:
2004-01-16  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/gstclock.c: (gst_clock_get_time):
make it compile with gcc 2.95 again.
Patch by Scott Wheeler
This commit is contained in:
Benjamin Otte 2004-01-16 22:56:34 +00:00
parent 40b4e2cb9c
commit b26be1ef68
2 changed files with 18 additions and 13 deletions

View file

@ -1,3 +1,9 @@
2004-01-16 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gstclock.c: (gst_clock_get_time):
make it compile with gcc 2.95 again.
Patch by Scott Wheeler
2004-01-15 David Schleef <ds@schleef.org>
* gst/gstcaps.h:

View file

@ -602,23 +602,22 @@ GstClockTime
gst_clock_get_time (GstClock *clock)
{
GstClockTime ret = G_GINT64_CONSTANT (0);
GstClockClass *cclass;
g_return_val_if_fail (GST_IS_CLOCK (clock), G_GINT64_CONSTANT (0));
GstClockClass *cclass;
cclass = GST_CLOCK_GET_CLASS (clock);
cclass = GST_CLOCK_GET_CLASS (clock);
if (cclass->get_internal_time) {
ret = cclass->get_internal_time (clock) - clock->start_time;
}
/* make sure the time is increasing, else return last_time */
if ((gint64) ret < (gint64) clock->last_time) {
ret = clock->last_time;
}
else {
clock->last_time = ret;
}
if (cclass->get_internal_time) {
ret = cclass->get_internal_time (clock) - clock->start_time;
}
/* make sure the time is increasing, else return last_time */
if ((gint64) ret < (gint64) clock->last_time) {
ret = clock->last_time;
}
else {
clock->last_time = ret;
}
return ret;
}