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) { if (osssink->clock) {
gint delay = 0; gint delay = 0;
gint64 queued; gint64 queued;
GstClockTimeDiff jitter;
delay = gst_osssink_get_delay (osssink); delay = gst_osssink_get_delay (osssink);
queued = delay * GST_SECOND / GST_OSSELEMENT (osssink)->bps; queued = delay * GST_SECOND / GST_OSSELEMENT (osssink)->bps;
if (osssink->resync && osssink->sync) { if (osssink->resync && osssink->sync) {
gst_audio_clock_set_active ((GstAudioClock*)osssink->provided_clock, TRUE); GstClockID id = gst_clock_new_single_shot_id (osssink->clock, buftime - queued);
gst_clock_handle_discont (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; to_write = size;
gst_audio_clock_set_active ((GstAudioClock*)osssink->provided_clock, TRUE);
osssink->resync = FALSE; osssink->resync = FALSE;
} }
}
else { else {
to_write = size; to_write = size;
} }