[Bug 759055] baseparse: post tag list updates on percentage delta instead of fixed delta

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Dec 7 06:09:40 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=759055

--- Comment #3 from Athanasios Oikonomou <athoik at gmail.com> ---
Review of attachment 316800:
 --> (https://bugzilla.gnome.org/review?bug=759055&attachment=316800)

::: libs/gst/base/gstbaseparse.c
@@ +1759,3 @@
+    if (parse->priv->post_avg_bitrate && parse->priv->avg_bitrate) {
+      gint diffprev = (gint) 100 * (ABSDIFF (parse->priv->avg_bitrate,
+          parse->priv->posted_avg_bitrate)) / parse->priv->avg_bitrate;

The evaluation order is left to right, so first it multiplies and then it
divides already.

I'll change patch to use gst_util_uint64_scale_int().

guint64 diffprev = gst_util_uint64_scale_int(100,
   ABSDIFF(parse->priv->avg_bitrate, parse->priv->posted_avg_bitrate),
   parse->priv->avg_bitrate);

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list