diff --git a/subprojects/gstreamer/plugins/elements/gstinputselector.c b/subprojects/gstreamer/plugins/elements/gstinputselector.c index 510224a37b..ac6735d264 100644 --- a/subprojects/gstreamer/plugins/elements/gstinputselector.c +++ b/subprojects/gstreamer/plugins/elements/gstinputselector.c @@ -839,6 +839,13 @@ gst_input_selector_wait_running_time (GstInputSelector * sel, GstClockTimeDiff jitter; GstClockID clock_id; + if (!sel->playing) { + GST_DEBUG_OBJECT (selpad, "Waiting for playing"); + GST_INPUT_SELECTOR_WAIT (sel); + GST_DEBUG_OBJECT (selpad, "Done waiting"); + continue; + } + base_time = gst_element_get_base_time (GST_ELEMENT_CAST (sel)); if (!GST_CLOCK_TIME_IS_VALID (base_time)) { GST_DEBUG_OBJECT (selpad, "sync-mode=clock but no base time. Blocking"); @@ -853,13 +860,6 @@ gst_input_selector_wait_running_time (GstInputSelector * sel, continue; } - if (!sel->playing) { - GST_DEBUG_OBJECT (selpad, "Waiting for playing"); - GST_INPUT_SELECTOR_WAIT (sel); - GST_DEBUG_OBJECT (selpad, "Done waiting"); - continue; - } - /* FIXME: If no upstream latency was queried yet, do one now */ clock_id = gst_clock_new_single_shot_id (clock,