mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 04:58:47 +00:00
aggregator: Fail the latency query if one of the upstream queries fails
This commit is contained in:
parent
84ab11afdb
commit
44ffb87f8a
1 changed files with 6 additions and 1 deletions
|
@ -1117,6 +1117,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
GstClockTime min, max;
|
GstClockTime min, max;
|
||||||
gboolean live;
|
gboolean live;
|
||||||
|
gboolean res;
|
||||||
} LatencyData;
|
} LatencyData;
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -1148,6 +1149,9 @@ gst_aggregator_query_sink_latency_foreach (GstAggregator * self,
|
||||||
|
|
||||||
data->live = TRUE;
|
data->live = TRUE;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
GST_LOG_OBJECT (pad, "latency query failed");
|
||||||
|
data->res = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_query_unref (query);
|
gst_query_unref (query);
|
||||||
|
@ -1207,6 +1211,7 @@ gst_aggregator_query_latency (GstAggregator * self, GstQuery * query)
|
||||||
data.min = 0;
|
data.min = 0;
|
||||||
data.max = GST_CLOCK_TIME_NONE;
|
data.max = GST_CLOCK_TIME_NONE;
|
||||||
data.live = FALSE;
|
data.live = FALSE;
|
||||||
|
data.res = TRUE;
|
||||||
|
|
||||||
/* query upstream's latency */
|
/* query upstream's latency */
|
||||||
SRC_LOCK (self);
|
SRC_LOCK (self);
|
||||||
|
@ -1262,7 +1267,7 @@ gst_aggregator_query_latency (GstAggregator * self, GstQuery * query)
|
||||||
|
|
||||||
gst_query_set_latency (query, data.live, data.min, data.max);
|
gst_query_set_latency (query, data.live, data.min, data.max);
|
||||||
|
|
||||||
return TRUE;
|
return data.res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue