mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
alsamidisrc: Don't assume a clock has been set
Can happen in testing scenarios for example
This commit is contained in:
parent
17e1e308a3
commit
c3875a236b
1 changed files with 4 additions and 0 deletions
|
@ -625,6 +625,10 @@ gst_alsa_midi_src_state_changed (GstElement * element, GstState oldstate,
|
|||
snd_seq_queue_status_t *status;
|
||||
|
||||
clock = gst_element_get_clock (element);
|
||||
if (clock == NULL) {
|
||||
GST_WARNING_OBJECT (element, "No clock present");
|
||||
return;
|
||||
}
|
||||
gst_time = gst_clock_get_time (clock);
|
||||
gst_object_unref (clock);
|
||||
base_time = gst_element_get_base_time (element);
|
||||
|
|
Loading…
Reference in a new issue