diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2007-03-04 14:56:53 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2007-03-04 14:56:53 +0000 |
commit | 7f83d0233b8dfc1fd5030604cc1a2d918109b0ca (patch) | |
tree | d289b44ceef13d3173e5609669ffbb049f3beeef /sys | |
parent | de1357a4074d7cab9df163237bcfbce653d417e7 (diff) |
sys/ximage/gstximagesrc.c: Catch the case where no clock has been set.
Original commit message from CVS:
* sys/ximage/gstximagesrc.c: (gst_ximage_src_create):
Catch the case where no clock has been set.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ximage/gstximagesrc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/ximage/gstximagesrc.c b/sys/ximage/gstximagesrc.c index d695837f..024f7c63 100644 --- a/sys/ximage/gstximagesrc.c +++ b/sys/ximage/gstximagesrc.c @@ -658,6 +658,13 @@ gst_ximage_src_create (GstPushSrc * bs, GstBuffer ** buf) * before capturing */ GST_OBJECT_LOCK (s); + if (GST_ELEMENT_CLOCK (s) == NULL) { + GST_OBJECT_UNLOCK (s); + GST_ELEMENT_ERROR (s, RESOURCE, FAILED, + (_("Cannot operate without a clock")), (NULL)); + return GST_FLOW_ERROR; + } + base_time = GST_ELEMENT_CAST (s)->base_time; next_capture_ts = gst_clock_get_time (GST_ELEMENT_CLOCK (s)); next_capture_ts -= base_time; |