From a0dc29841ccf7ce6f61c628273aebca3bfdf4feb Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sat, 19 Feb 2022 01:58:20 +0900 Subject: [PATCH] videoaggregator: Use floor() to calculate current position ... instead of round(). Depending on framerate, calculated position may not be clearly represented by using uint64, 30000/1001 for example. Then the result of round() can be sliglhtly larger (1ns) than buffer timestamp. And that will cause unnecessary frame delay. Part-of: --- .../gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c index 19ec53b224..75bd663d11 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c @@ -2263,7 +2263,7 @@ gst_video_aggregator_aggregate (GstAggregator * agg, gboolean timeout) if (GST_VIDEO_INFO_FPS_N (&vagg->info) == 0) { output_end_time = -1; } else { - guint64 dur = gst_util_uint64_scale_round (vagg->priv->nframes + 1, + guint64 dur = gst_util_uint64_scale (vagg->priv->nframes + 1, GST_SECOND * GST_VIDEO_INFO_FPS_D (&vagg->info), GST_VIDEO_INFO_FPS_N (&vagg->info));