validate:scenario: Alway execute a 'quit' action on EOS

Summary: Making scenario more usable with LD_PRELOAD

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D72
This commit is contained in:
Thibault Saunier 2015-02-26 15:21:01 +01:00 committed by Thibault Saunier
parent 460bf61345
commit 1e6b188d78

View file

@ -1711,6 +1711,9 @@ message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario)
case GST_MESSAGE_ERROR:
case GST_MESSAGE_EOS:
{
GstValidateAction *stop_action;
GstValidateActionType *stop_action_type;
SCENARIO_LOCK (scenario);
if (scenario->priv->actions || scenario->priv->interlaced_actions ||
scenario->priv->on_addition_actions) {
@ -1755,6 +1758,12 @@ message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario)
}
SCENARIO_UNLOCK (scenario);
stop_action_type = _find_action_type ("stop");
stop_action = gst_validate_action_new (scenario, stop_action_type);
_fill_action (scenario, stop_action,
gst_structure_from_string ("stop;", NULL), FALSE);
gst_validate_execute_action (stop_action_type, stop_action);
break;
}
case GST_MESSAGE_BUFFERING: