mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
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
This commit is contained in:
parent
95fcced84d
commit
d7c87910c2
1 changed files with 2 additions and 2 deletions
|
@ -1863,7 +1863,7 @@ gst_base_parse_update_bitrates (GstBaseParse * parse, GstBaseParseFrame * frame)
|
|||
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;
|
||||
|
@ -1914,7 +1914,7 @@ gst_base_parse_update_bitrates (GstBaseParse * parse, GstBaseParseFrame * frame)
|
|||
|
||||
/* 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)
|
||||
|
|
Loading…
Reference in a new issue