Commit 521245fa authored by Thibault Saunier's avatar Thibault Saunier 🌵 Committed by GStreamer Marge Bot

validate:scenario: Round results of expressions in a sensible way

Part-of: <gstreamer/gst-devtools!207>
parent 19550bec
......@@ -848,7 +848,10 @@ gst_validate_action_get_clocktime (GstValidateScenario * scenario,
} else if (val == -1.0) {
*retval = GST_CLOCK_TIME_NONE;
} else {
*retval = val * GST_SECOND;
gint n, d;
gst_util_double_to_fraction (val, &n, &d);
*retval = gst_util_uint64_scale_int_round (n, GST_SECOND, d);
}
gst_structure_set (action->structure, name, G_TYPE_UINT64, *retval, NULL);
g_free (strval);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment