rsninputselector: Fail the latency query if one of the upstream queries fails

This commit is contained in:
Sebastian Dröge 2015-02-19 01:28:30 +02:00
parent e02d6983c9
commit 1bd7b4566e

View file

@ -1535,6 +1535,7 @@ gst_input_selector_query (GstPad * pad, GstObject * parent, GstQuery * query)
/* perform the query on all sinkpads and combine the results. We take the
* max of min and the min of max for the result latency. */
res = TRUE;
GST_INPUT_SELECTOR_LOCK (sel);
for (walk = GST_ELEMENT_CAST (sel)->sinkpads; walk;
walk = g_list_next (walk)) {
@ -1544,9 +1545,6 @@ gst_input_selector_query (GstPad * pad, GstObject * parent, GstQuery * query)
GstClockTime min, max;
gboolean live;
/* one query succeeded, we succeed too */
res = TRUE;
gst_query_parse_latency (query, &live, &min, &max);
GST_DEBUG_OBJECT (sinkpad,
@ -1562,6 +1560,9 @@ gst_input_selector_query (GstPad * pad, GstObject * parent, GstQuery * query)
resmax = max;
reslive = TRUE;
}
} else {
GST_LOG_OBJECT (sinkpad, "latency query failed");
res = FALSE;
}
}
GST_INPUT_SELECTOR_UNLOCK (sel);