gst/elements/gstfakesrc.c (gst_fake_src_create): It's not an error if the user selected "no clock" as the clocking me...

Original commit message from CVS:
2005-11-15  Andy Wingo  <wingo@pobox.com>

* gst/elements/gstfakesrc.c (gst_fake_src_create): It's not an
error if the user selected "no clock" as the clocking method.
This commit is contained in:
Andy Wingo 2005-11-15 12:35:45 +00:00
parent 58a5b2f5fa
commit 7688db602f
3 changed files with 19 additions and 10 deletions

View file

@ -1,5 +1,8 @@
2005-11-15 Andy Wingo <wingo@pobox.com>
* gst/elements/gstfakesrc.c (gst_fake_src_create): It's not an
error if the user selected "no clock" as the clocking method.
* check/gst/gstpipeline.c (test_base_time): New test for buffer
timestamps with live capture.

View file

@ -704,12 +704,15 @@ gst_fake_src_create (GstBaseSrc * basesrc, guint64 offset, guint length,
GstClock *clock;
clock = gst_element_get_clock (GST_ELEMENT (src));
g_return_val_if_fail (clock != NULL, GST_FLOW_ERROR);
time = gst_clock_get_time (clock);
time -= gst_element_get_base_time (GST_ELEMENT (src));
gst_object_unref (clock);
if (clock) {
time = gst_clock_get_time (clock);
time -= gst_element_get_base_time (GST_ELEMENT (src));
gst_object_unref (clock);
} else {
/* not an error not to have a clock */
time = GST_CLOCK_TIME_NONE;
}
} else {
time = GST_CLOCK_TIME_NONE;
}

View file

@ -704,12 +704,15 @@ gst_fake_src_create (GstBaseSrc * basesrc, guint64 offset, guint length,
GstClock *clock;
clock = gst_element_get_clock (GST_ELEMENT (src));
g_return_val_if_fail (clock != NULL, GST_FLOW_ERROR);
time = gst_clock_get_time (clock);
time -= gst_element_get_base_time (GST_ELEMENT (src));
gst_object_unref (clock);
if (clock) {
time = gst_clock_get_time (clock);
time -= gst_element_get_base_time (GST_ELEMENT (src));
gst_object_unref (clock);
} else {
/* not an error not to have a clock */
time = GST_CLOCK_TIME_NONE;
}
} else {
time = GST_CLOCK_TIME_NONE;
}