mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
validate: Add actions to the actions list only when they are fully parsed
Otherwize in some corner cases they can be executed before they are actually parsed
This commit is contained in:
parent
2f44d15e0b
commit
5e0e092112
1 changed files with 17 additions and 2 deletions
|
@ -676,6 +676,17 @@ gst_validate_scenario_update_segment_from_seek (GstValidateScenario * scenario,
|
|||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
_compare_actions (GstValidateAction *a, GstValidateAction * b)
|
||||
{
|
||||
if (a->action_number < b->action_number)
|
||||
return -1;
|
||||
else if (a->action_number == b->action_number)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario)
|
||||
{
|
||||
|
@ -704,6 +715,9 @@ message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario)
|
|||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
priv->actions = g_list_insert_sorted (priv->actions, action,
|
||||
(GCompareFunc) _compare_actions);
|
||||
}
|
||||
|
||||
g_list_free (priv->needs_parsing);
|
||||
|
@ -909,7 +923,7 @@ _load_scenario_file (GstValidateScenario * scenario,
|
|||
gdouble playback_time;
|
||||
GstValidateAction *action;
|
||||
GstValidateActionType *action_type;
|
||||
const gchar *type, *str_playback_time;
|
||||
const gchar *type, *str_playback_time = NULL;
|
||||
|
||||
GstStructure *structure = tmp->data;
|
||||
|
||||
|
@ -951,6 +965,7 @@ _load_scenario_file (GstValidateScenario * scenario,
|
|||
}
|
||||
|
||||
action->action_number = priv->num_actions++;
|
||||
if (str_playback_time == NULL)
|
||||
priv->actions = g_list_append (priv->actions, action);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue