validate: fix pause duration handling

Commit 394242c224 ("validate:scenario: Enhance variable
implementation") caused the duration parameter to be stored
as a double instead of GstClockTime, which the _execute_pause
implementation expects. Fix the parameter type and use
gst_validate_action_get_clocktime to handle duration correctly.

https://gitlab.freedesktop.org/gstreamer/gst-devtools/merge_requests/73
This commit is contained in:
Philipp Zabel 2019-03-08 15:44:31 +01:00 committed by Nicolas Dufresne
parent 4262c23a9c
commit 99eaad17e2

View file

@ -847,8 +847,7 @@ _execute_pause (GstValidateScenario * scenario, GstValidateAction * action)
GstClockTime duration = 0;
GstValidateExecuteActionReturn ret;
gst_structure_get (action->structure, "duration", G_TYPE_UINT64, &duration,
NULL);
gst_validate_action_get_clocktime (scenario, action, "duration", &duration);
gst_structure_set (action->structure, "state", G_TYPE_STRING, "paused", NULL);
GST_INFO_OBJECT (scenario, "Pausing for %" GST_TIME_FORMAT,
@ -4806,7 +4805,7 @@ init_scenarios (void)
.name = "duration",
.description = "The duration during which the stream will be paused",
.mandatory = FALSE,
.types = "double",
.types = "double or string (GstClockTime)",
.possible_variables = NULL,
.def = "0.0",
},