[MOVED FROM GST-P-FARSIGHT] error if no clock is available

20080428154850-4f0f6-38fdc4134835c457d0054301579d8cd4cbd4989a.gz
This commit is contained in:
Youness Alaoui 2008-04-28 15:48:50 +00:00 committed by Edward Hervey
parent c9450ad8e2
commit 2a2d21a1f2

View file

@ -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);