From ba38d099617950f6c6c75a99d89b89795b62acbb Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 1 May 2014 14:58:14 +0200 Subject: [PATCH] validate: Execute position right when the pipeline reaches PAUSED We might go to PAUSED SYNC if nothing happens in the pipeline --- validate/gst/validate/gst-validate-scenario.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index 25c4b65b3e..e05fcdea6d 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -841,9 +841,19 @@ message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario) g_list_free (priv->needs_parsing); priv->needs_parsing = NULL; } - _add_get_position_source (scenario); break; + case GST_MESSAGE_STATE_CHANGED: + { + if (GST_MESSAGE_SRC (message) == GST_OBJECT (scenario->pipeline)) { + GstState nstate; + + gst_message_parse_state_changed (message, + NULL, &nstate, NULL); + _add_get_position_source (scenario); + } + break; + } case GST_MESSAGE_ERROR: case GST_MESSAGE_EOS: {