baseparse: avg_bitrate calculation critical warning fix
The avg_bitrate is an unsigned int, so the gst_util_uin64_scale() function can't
be used for it, as it expects signed integers for the fraction parts arguments.
https://bugzilla.gnome.org/show_bug.cgi?id=797054
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index 8ac6a3f..9a8f986 100644
--- a/libs/gst/base/gstbaseparse.c
+++ b/libs/gst/base/gstbaseparse.c
@@ -1821,7 +1821,7 @@
if (avg_bitrate > G_MAXUINT)
return;
- parse->priv->avg_bitrate = avg_bitrate;
+ parse->priv->avg_bitrate = (guint) avg_bitrate;
} else {
/* No way to figure out frame duration (is this even possible?) */
return;
@@ -1872,7 +1872,7 @@
/* Only update the tag on a 2% change */
if (parse->priv->post_avg_bitrate && parse->priv->avg_bitrate) {
- guint64 diffprev = gst_util_uint64_scale_int (100,
+ guint64 diffprev = gst_util_uint64_scale (100,
ABSDIFF (parse->priv->avg_bitrate, parse->priv->posted_avg_bitrate),
parse->priv->avg_bitrate);
if (diffprev >= UPDATE_THRESHOLD)