ext/alsa/gstalsa.c: cast to GstClockTime to get higher granularity

Original commit message from CVS:
* ext/alsa/gstalsa.c: (gst_alsa_samples_to_timestamp):
cast to GstClockTime to get higher granularity
* ext/alsa/gstalsasink.c: (gst_alsa_sink_check_event):
use gst_element_set_time_delay to get the exact time
* ext/mad/gstmad.c: (gst_mad_chain):
use the negotiated rate instead of the current frame's rate which
might be wrong because of bit errors. This avoids emitting totally
bogus timestamps and screwing sync.
(fixes #143454)
This commit is contained in:
Benjamin Otte 2004-06-07 01:41:37 +00:00
parent 3245b4ee99
commit 81bbf631d5
2 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,15 @@
2004-06-07 Benjamin Otte <otte@gnome.org>
* ext/alsa/gstalsa.c: (gst_alsa_samples_to_timestamp):
cast to GstClockTime to get higher granularity
* ext/alsa/gstalsasink.c: (gst_alsa_sink_check_event):
use gst_element_set_time_delay to get the exact time
* ext/mad/gstmad.c: (gst_mad_chain):
use the negotiated rate instead of the current frame's rate which
might be wrong because of bit errors. This avoids emitting totally
bogus timestamps and screwing sync.
(fixes #143454)
2004-06-07 Tim-Philipp Müller <t.i.m@zen.co.uk>
reviewed by Benjamin Otte <otte@gnome.org>

View file

@ -1376,9 +1376,8 @@ gst_mad_chain (GstPad * pad, GstData * _data)
&mad->total_samples);
mad->last_ts = GST_CLOCK_TIME_NONE;
}
time_offset = mad->total_samples * GST_SECOND
/ mad->frame.header.samplerate;
time_duration = (nsamples * GST_SECOND / mad->frame.header.samplerate);
time_offset = mad->total_samples * GST_SECOND / mad->rate;
time_duration = (nsamples * GST_SECOND / mad->rate);
}
if (mad->index) {