validate-scenario: Don't end up with invalid action name
authorEdward Hervey <edward@centricular.com>
Fri, 5 May 2017 12:57:56 +0000 (14:57 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Fri, 5 May 2017 13:27:37 +0000 (15:27 +0200)
When replacing an action structure, also update the action name with
the (new) name from the new structure. Otherwise we end up with
a bogus name from the previous (deleted) structure.

validate/gst/validate/gst-validate-scenario.c

index 4e41aca..94b677c 100644 (file)
@@ -1524,6 +1524,9 @@ gst_validate_execute_action (GstValidateActionType * action_type,
     action->priv->printed = FALSE;
     action->structure = gst_structure_copy (action->priv->main_structure);
 
+    if (!(action->name = gst_structure_get_string (action->structure, "name")))
+      action->name = "";
+
     if (res == GST_VALIDATE_EXECUTE_ACTION_ASYNC)
       action->priv->executing_last_subaction = TRUE;
   }