diff --git a/validate/gst/validate/gst-validate-pipeline-monitor.c b/validate/gst/validate/gst-validate-pipeline-monitor.c index 795e2ca3ce..2d95092257 100644 --- a/validate/gst/validate/gst-validate-pipeline-monitor.c +++ b/validate/gst/validate/gst-validate-pipeline-monitor.c @@ -146,15 +146,6 @@ _check_pad_query_failures (GstPad * pad, GString * str, GstValidatePadMonitor *monitor; GstPad *ghost_target = NULL; - if (GST_IS_GHOST_PAD (pad)) { - ghost_target = gst_ghost_pad_get_target (GST_GHOST_PAD (pad)); - - if (!ghost_target) - return; - - pad = ghost_target; - } - monitor = g_object_get_data (G_OBJECT (pad), "validate-monitor"); if (monitor->last_query_res && gst_caps_is_empty (monitor->last_query_res)) { @@ -185,6 +176,25 @@ _gather_pad_negotiation_details (GstPad * pad, GString * str, if (!peer) return; + while (GST_IS_PROXY_PAD (peer)) { + GstPad *next_pad; + + if (GST_IS_GHOST_PAD (peer)) { + next_pad = gst_pad_get_peer (peer); + + if (next_pad == pad) + next_pad = gst_ghost_pad_get_target (GST_GHOST_PAD (peer)); + } else { + next_pad = GST_PAD (gst_proxy_pad_get_internal (GST_PROXY_PAD (peer))); + } + + if (!next_pad) + return; + + gst_object_unref (peer); + peer = next_pad; + } + _check_pad_query_failures (peer, str, last_query_caps_fail_monitor, last_refused_caps_monitor); diff --git a/validate/tests/launcher_tests/test_validate.py b/validate/tests/launcher_tests/test_validate.py index f03441376b..34c3fa2619 100644 --- a/validate/tests/launcher_tests/test_validate.py +++ b/validate/tests/launcher_tests/test_validate.py @@ -34,7 +34,7 @@ def get_pipelines(test_manager): {'level': 'critical', 'summary': 'a NOT NEGOTIATED message has been posted on the bus.', 'details': r'.*Caps negotiation failed at pad.*capsfilter:sink.*as it refused caps:.*'}]}), ("not_negotiated.caps_query_failure", - "audiotestsrc ! input-selector name=i ! capsfilter name=capsfilter caps=video/x-raw ! fakesink", + "\( \( audiotestsrc \) ! input-selector name=i \) ! capsfilter name=capsfilter caps=video/x-raw ! fakesink", {"expected-failures": [ {'returncode': 18}, {'level': 'critical', 'summary': 'a NOT NEGOTIATED message has been posted on the bus.',