gst-libs/gst/audio/gstbaseaudiosink.c: Respect segment rate and accum when scheduling samples.

Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Respect segment rate and accum when scheduling samples.
This commit is contained in:
Wim Taymans 2005-10-11 17:31:48 +00:00
parent a03a6eebb1
commit 0c71c6348f
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-10-11 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Respect segment rate and accum when scheduling samples.
2005-10-11 Julien MOUTTE <julien@moutte.net>
* ext/ogg/gstoggmux.c: (gst_ogg_mux_queue_pads),

View file

@ -369,6 +369,10 @@ gst_base_audio_sink_render (GstBaseSink * bsink, GstBuffer * buf)
/* bring buffer timestamp to stream time */
render_time = render_diff;
/* adjust for rate */
render_time /= ABS (bsink->segment_rate);
/* adjust for accumulated segments */
render_time += bsink->segment_accum;
/* add base time to get absolute clock time */
render_time += gst_element_get_base_time (GST_ELEMENT (bsink));
/* and bring the time to the offset in the buffer */