validate: Misc fixes

This commit is contained in:
Thibault Saunier 2015-02-11 18:27:10 +01:00
parent f4c6ed368e
commit 6181f7763d

View file

@ -2483,9 +2483,14 @@ gst_validate_print_action_types (const gchar ** wanted_types,
GstValidateAction *
gst_validate_scenario_get_next_action (GstValidateScenario * scenario)
{
if (scenario->priv->actions && scenario->priv->actions->next)
return (GstValidateAction *) gst_mini_object_ref ((GstMiniObject *)
scenario->priv->actions->next->data);
if (GPOINTER_TO_INT (g_private_get (&main_thread_priv))) {
if (scenario->priv->actions && scenario->priv->actions->next)
return (GstValidateAction *) gst_mini_object_ref ((GstMiniObject *)
scenario->priv->actions->next->data);
} else {
GST_WARNING_OBJECT (scenario, "Trying to get next action from outside"
" the 'main' thread");
}
return NULL;
}