+2005-11-18 Wim Taymans <wim@fluendo.com>
+
+ * gst/base/gstbasesink.c: (gst_base_sink_get_position):
+ For the current position in stream time, we need to subtract
+ accumulated time.
+
+ * gst/gstsystemclock.c: (gst_system_clock_async_thread):
+ Release lock before calling the callback function of async
+ entries.
+
2005-11-18 Andy Wingo <wingo@pobox.com>
* gst/net/gstnetclientclock.c (gst_net_client_clock_class_init):
else
segment_time = 0;
- *cur = now - GST_ELEMENT_CAST (basesink)->base_time + segment_time;
+ *cur = now - GST_ELEMENT_CAST (basesink)->base_time -
+ basesink->segment_accum + segment_time;
GST_DEBUG_OBJECT (basesink,
"now %" GST_TIME_FORMAT " + segment_time %" GST_TIME_FORMAT " = %"
* entry */
GST_CAT_DEBUG (GST_CAT_CLOCK, "async entry %p unlocked", entry);
if (entry->func) {
+ /* unlock before firing the callback */
+ GST_UNLOCK (clock);
entry->func (clock, entry->time, (GstClockID) entry,
entry->user_data);
+ GST_LOCK (clock);
}
if (entry->type == GST_CLOCK_ENTRY_PERIODIC) {
/* adjust time now */
else
segment_time = 0;
- *cur = now - GST_ELEMENT_CAST (basesink)->base_time + segment_time;
+ *cur = now - GST_ELEMENT_CAST (basesink)->base_time -
+ basesink->segment_accum + segment_time;
GST_DEBUG_OBJECT (basesink,
"now %" GST_TIME_FORMAT " + segment_time %" GST_TIME_FORMAT " = %"