mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
validate: scenario: Mark action as being executed right before calling ->execute
And make sure that we do not try to execute the following action In the case the action type leads to the GMainContext to be ieterated
This commit is contained in:
parent
31164cf0a6
commit
7e70bf8729
2 changed files with 8 additions and 2 deletions
|
@ -1704,6 +1704,7 @@ gst_validate_execute_action (GstValidateActionType * action_type,
|
|||
gst_validate_print_action (action, NULL);
|
||||
|
||||
action->priv->execution_time = gst_util_get_timestamp ();
|
||||
action->priv->state = GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS;
|
||||
res = action_type->execute (scenario, action);
|
||||
gst_object_unref (scenario);
|
||||
|
||||
|
@ -1958,7 +1959,11 @@ execute_next_action (GstValidateScenario * scenario)
|
|||
act = scenario->priv->actions->data;
|
||||
|
||||
if (act) {
|
||||
if (act->priv->state == GST_VALIDATE_EXECUTE_ACTION_OK && act->repeat <= 0) {
|
||||
|
||||
if (act->priv->state == GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS) {
|
||||
return G_SOURCE_CONTINUE;
|
||||
} else if (act->priv->state == GST_VALIDATE_EXECUTE_ACTION_OK
|
||||
&& act->repeat <= 0) {
|
||||
tmp = priv->actions;
|
||||
priv->actions = g_list_remove_link (priv->actions, tmp);
|
||||
|
||||
|
|
|
@ -46,7 +46,8 @@ typedef enum
|
|||
GST_VALIDATE_EXECUTE_ACTION_OK,
|
||||
GST_VALIDATE_EXECUTE_ACTION_ASYNC,
|
||||
GST_VALIDATE_EXECUTE_ACTION_INTERLACED,
|
||||
GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED
|
||||
GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED,
|
||||
GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS
|
||||
} GstValidateActionReturn;
|
||||
|
||||
/* TODO 2.0 -- Make it an actual enum type */
|
||||
|
|
Loading…
Reference in a new issue