From 3ebc26e26505ce1fc137bbb8bd1c50e46f545c4e Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 7 Feb 2019 17:34:56 +0100 Subject: [PATCH] validate: don't override max-latency if config contains multiple structs gst_validate_utils_get_clocktime() is resetting the value if it's not present in the struct so we were overriding it on the next iterations. --- validate/gst/validate/gst-validate-scenario.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index fa7be9d664..dc224fb8a3 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -3306,8 +3306,12 @@ _load_scenario_file (GstValidateScenario * scenario, /* max-latency and max-dropped can be overriden using config */ for (config = gst_validate_plugin_get_config (NULL); config; config = g_list_next (config)) { + GstClockTime max_latency; + gst_validate_utils_get_clocktime (config->data, "max-latency", - &priv->max_latency); + &max_latency); + if (GST_CLOCK_TIME_IS_VALID (max_latency)) + priv->max_latency = max_latency; gst_structure_get_int (config->data, "max-dropped", &priv->max_dropped); }