From 1bd7b4566e43b5f12d423ee1650773ed858a61c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 19 Feb 2015 01:28:30 +0200 Subject: [PATCH] rsninputselector: Fail the latency query if one of the upstream queries fails --- ext/resindvd/rsninputselector.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/resindvd/rsninputselector.c b/ext/resindvd/rsninputselector.c index b1c9d7ab74..75d8724dd2 100644 --- a/ext/resindvd/rsninputselector.c +++ b/ext/resindvd/rsninputselector.c @@ -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);