Go back to old code, it works good enough...

Original commit message from CVS:
Go back to old code, it works good enough...
This commit is contained in:
Ronald S. Bultje 2003-12-17 22:36:20 +00:00
parent 21693f54de
commit 9b57e0a57d

View file

@ -379,16 +379,24 @@ gst_osssink_chain (GstPad *pad, GstData *_data)
if (osssink->clock) {
gint delay = 0;
gint64 queued;
GstClockTimeDiff jitter;
delay = gst_osssink_get_delay (osssink);
queued = delay * GST_SECOND / GST_OSSELEMENT (osssink)->bps;
if (osssink->resync && osssink->sync) {
gst_audio_clock_set_active ((GstAudioClock*)osssink->provided_clock, TRUE);
gst_clock_handle_discont (osssink->clock, buftime - queued);
GstClockID id = gst_clock_new_single_shot_id (osssink->clock, buftime - queued);
gst_element_clock_wait (GST_ELEMENT (osssink), id, &jitter);
gst_clock_id_free (id);
if (jitter >= 0) {
gst_clock_handle_discont (osssink->clock, buftime - queued + jitter);
to_write = size;
gst_audio_clock_set_active ((GstAudioClock*)osssink->provided_clock, TRUE);
osssink->resync = FALSE;
}
}
else {
to_write = size;
}