diff options
-rw-r--r-- | gst/liveadder/liveadder.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index 3f553b44..68796047 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -1028,9 +1028,10 @@ gst_live_adder_loop (gpointer data) buffer_timestamp = GST_BUFFER_TIMESTAMP (g_queue_peek_head (adder->buffers)); clock = GST_ELEMENT_CLOCK (adder); - if (!clock) - /* let's just push if there is no clock */ - goto push_buffer; + + if (!clock) { + goto no_clock; + } GST_DEBUG_OBJECT (adder, "sync to timestamp %" GST_TIME_FORMAT, GST_TIME_ARGS (buffer_timestamp)); @@ -1068,8 +1069,6 @@ gst_live_adder_loop (gpointer data) if (ret != GST_CLOCK_OK && ret != GST_CLOCK_EARLY) goto clock_error; - push_buffer: - buffer = g_queue_pop_head (adder->buffers); if (!buffer) @@ -1147,6 +1146,16 @@ gst_live_adder_loop (gpointer data) return; } + no_clock: + { + gst_pad_pause_task (adder->srcpad); + GST_OBJECT_UNLOCK (adder); + GST_ELEMENT_ERROR (adder, STREAM, MUX, ("No available clock"), + ("No available clock")); + GST_ERROR_OBJECT (adder, "No available clock"); + return; + } + pause: { const gchar *reason = gst_flow_get_name (result); |