BT_LOGV("Making next sink consume: addr=%p", graph);
+ if (!graph->has_sink) {
+ BT_LOGW_STR("Graph has no sink component.");
+ status = BT_GRAPH_STATUS_NO_SINK;
+ goto end;
+ }
+
if (g_queue_is_empty(graph->sinks_to_consume)) {
BT_LOGV_STR("Graph's sink queue is empty: end of graph.");
status = BT_GRAPH_STATUS_END;
if (graph->sinks_to_consume->length > 1) {
status = BT_GRAPH_STATUS_OK;
}
+ } else if (status == BT_GRAPH_STATUS_NO_SINK) {
+ goto end;
}
} while (status == BT_GRAPH_STATUS_OK);
* sink queue to be consumed by bt_graph_consume().
*/
if (bt_component_is_sink(component)) {
+ graph->has_sink = BT_TRUE;
g_queue_push_tail(graph->sinks_to_consume, component);
}