From: Stefan Kost Date: Mon, 24 Nov 2008 20:11:52 +0000 (+0000) Subject: gst-libs/gst/audio/gstbaseaudiosink.c: Time is already in running_time. Remove base_t... X-Git-Tag: 1.19.3~511^2~10172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8264f66c778ffa165c4b9359db0e582c0730aaf;p=platform%2Fupstream%2Fgstreamer.git gst-libs/gst/audio/gstbaseaudiosink.c: Time is already in running_time. Remove base_time handling. Fixes audiosinks n... Original commit message from CVS: * gst-libs/gst/audio/gstbaseaudiosink.c: Time is already in running_time. Remove base_time handling. Fixes audiosinks not draining and thus chopping some audio in the end. --- diff --git a/ChangeLog b/ChangeLog index 5274980..54fbad2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-24 Stefan Kost + + * gst-libs/gst/audio/gstbaseaudiosink.c: + Time is already in running_time. Remove base_time handling. Fixes + audiosinks not draining and thus chopping some audio in the end. + 2008-11-24 David Schleef * ext/ogg/gstoggmux.c: diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index 27cc66c..923db3c 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -709,8 +709,6 @@ gst_base_audio_sink_get_times (GstBaseSink * bsink, GstBuffer * buffer, static gboolean gst_base_audio_sink_drain (GstBaseAudioSink * sink) { - GstClockTime base_time; - if (!sink->ringbuffer) return TRUE; if (!sink->ringbuffer->spec.rate) @@ -734,18 +732,6 @@ gst_base_audio_sink_drain (GstBaseAudioSink * sink) "last sample %" G_GUINT64_FORMAT ", time %" GST_TIME_FORMAT, sink->next_sample, GST_TIME_ARGS (time)); - /* our time already includes the base_time, _wait_eos() wants a running_time - * so we have to subtract the base_time again here. FIXME, store an - * unadjusted EOS time so that we don't have to do this. */ - GST_OBJECT_LOCK (sink); - base_time = GST_ELEMENT_CAST (sink)->base_time; - GST_OBJECT_UNLOCK (sink); - - if (time > base_time) - time -= base_time; - else - time = 0; - /* wait for the EOS time to be reached, this is the time when the last * sample is played. */ gst_base_sink_wait_eos (GST_BASE_SINK (sink), time, NULL);