mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
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.
This commit is contained in:
parent
de1357a407
commit
7f83d0233b
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-03-04 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
|
* sys/ximage/gstximagesrc.c: (gst_ximage_src_create):
|
||||||
|
Catch the case where no clock has been set.
|
||||||
|
|
||||||
2007-03-04 Jan Schmidt <thaytan@mad.scientist.com>
|
2007-03-04 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* ext/flac/gstflacenc.c: (gst_flac_enc_finalize):
|
* ext/flac/gstflacenc.c: (gst_flac_enc_finalize):
|
||||||
|
|
|
@ -658,6 +658,13 @@ gst_ximage_src_create (GstPushSrc * bs, GstBuffer ** buf)
|
||||||
* before capturing */
|
* before capturing */
|
||||||
|
|
||||||
GST_OBJECT_LOCK (s);
|
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;
|
base_time = GST_ELEMENT_CAST (s)->base_time;
|
||||||
next_capture_ts = gst_clock_get_time (GST_ELEMENT_CLOCK (s));
|
next_capture_ts = gst_clock_get_time (GST_ELEMENT_CLOCK (s));
|
||||||
next_capture_ts -= base_time;
|
next_capture_ts -= base_time;
|
||||||
|
|
Loading…
Reference in a new issue