gst-libs/gst/audio/gstbaseaudiosrc.c: Also handle the case where there is no clock set on the audio source, like in t...

Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_create):
Also handle the case where there is no clock set on the audio source,
like in the unit tests.
This commit is contained in:
Wim Taymans 2007-10-08 18:02:53 +00:00
parent 41ae026041
commit c3dda05a8b
2 changed files with 13 additions and 6 deletions

View file

@ -1,3 +1,10 @@
2007-10-08 Wim Taymans <wim.taymans@gmail.com>
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_create):
Also handle the case where there is no clock set on the audio source,
like in the unit tests.
2007-10-08 Jan Schmidt <Jan.Schmidt@sun.com>
* gst-libs/gst/rtp/gstrtppayloads.c:

View file

@ -620,18 +620,18 @@ gst_base_audio_src_create (GstBaseSrc * bsrc, guint64 offset, guint length,
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
}
/* FIXME, we timestamp against our own clock, also handle the case
* where we are slaved to another clock. We currently refuse to accept
* any other clock than the one we provide, so this code is fine for
* now. */
GST_OBJECT_LOCK (src);
clock = GST_ELEMENT_CLOCK (src);
if (clock == src->clock) {
if (clock == NULL || clock == src->clock) {
/* timestamp against our own clock. We do this also when no external clock
* was provided to us. */
timestamp = gst_util_uint64_scale_int (sample, GST_SECOND, spec->rate);
} else {
GstClockTime base_time, latency;
/* take running time of the clock */
/* We are slaved to another clock, take running time of the clock and just
* timestamp against it. Somebody else in the pipeline should figure out the
* clock drift, for now. */
timestamp = gst_clock_get_time (clock);
base_time = GST_ELEMENT_CAST (src)->base_time;