From 9bba59d9ba88f92b1de59e021528a6686df8cf4b Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 29 Apr 2015 13:22:11 +0200 Subject: [PATCH] validate:scenario: Fix 'duration' property of the pause action We preparse it into and set it as GstClockTime in the structures so make sure to use them as such. --- validate/gst/validate/gst-validate-scenario.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index efc6051..13e4a9f 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -594,19 +594,19 @@ _execute_set_state (GstValidateScenario * scenario, GstValidateAction * action) static gboolean _execute_pause (GstValidateScenario * scenario, GstValidateAction * action) { - gdouble duration = 0; + GstClockTime duration = 0; GstStateChangeReturn ret; - gst_structure_get_double (action->structure, "duration", &duration); + gst_structure_get_uint64 (action->structure, "duration", &duration); gst_structure_set (action->structure, "state", G_TYPE_STRING, "paused", NULL); - GST_DEBUG ("Pausing for %" GST_TIME_FORMAT, - GST_TIME_ARGS (duration * GST_SECOND)); + GST_INFO_OBJECT (scenario, "Pausing for %" GST_TIME_FORMAT, + GST_TIME_ARGS (duration)); ret = _execute_set_state (scenario, action); if (ret && duration) - g_timeout_add (duration * 1000, + g_timeout_add (GST_TIME_AS_MSECONDS (duration), (GSourceFunc) _pause_action_restore_playing, scenario); return ret; -- 2.7.4