gst/sine/gstsinesrc.c (gst_sinesrc_wait): Add the base time.

Original commit message from CVS:
2005-09-27  Andy Wingo  <wingo@pobox.com>

* gst/sine/gstsinesrc.c (gst_sinesrc_wait): Add the base time.
This commit is contained in:
Andy Wingo 2005-09-27 09:22:30 +00:00
parent d812bea064
commit 9bea690fe1
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2005-09-27 Andy Wingo <wingo@pobox.com>
* gst/sine/gstsinesrc.c (gst_sinesrc_wait): Add the base time.
2005-09-26 Andy Wingo <wingo@pobox.com>
* gst/sine/gstsinesrc.h:

View file

@ -235,12 +235,15 @@ static GstClockReturn
gst_sinesrc_wait (GstSineSrc * src, GstClockTime time)
{
GstClockReturn ret;
GstClockTime base_time;
GST_LOCK (src);
/* clock_id should be NULL outside of this function */
g_assert (src->clock_id == NULL);
g_assert (GST_CLOCK_TIME_IS_VALID (time));
src->clock_id = gst_clock_new_single_shot_id (GST_ELEMENT_CLOCK (src), time);
base_time = GST_ELEMENT (src)->base_time;
src->clock_id = gst_clock_new_single_shot_id (GST_ELEMENT_CLOCK (src),
time + base_time);
GST_UNLOCK (src);
ret = gst_clock_id_wait (src->clock_id, NULL);