Commit c3dda05a authored by Wim Taymans's avatar Wim Taymans

gst-libs/gst/audio/gstbaseaudiosrc.c: Also handle the case where there is no...

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.
parent 41ae0260
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:
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment