GNOME Bugzilla – Bug 784250
rtpstats: Glib CRITICAL _gst_util_uint64_scale_int: assertion 'denom > 0' failed
Last modified: 2017-07-25 09:29:10 UTC
In gst-plugins-good/gst/rtpmanager/rtpstats.c, ctx->clock_rate is a guint32 whereas "denom" parameter of gst_util _uint64_scale_int is a gint. Indeed ctx->clock_rate can be set to -1 when rtpsource.c calls gst_rtp_packet_rate_ctx_reset with -1.
Created attachment 354573 [details] [review] rtpstats: fix assertion 'denom > 0' failed
Review of attachment 354573 [details] [review]: ::: gst/rtpmanager/rtpstats.c @@ +39,3 @@ guint32 new_packet_rate; + if ((gint) ctx->clock_rate <= 0) { I think Miguel just got it wrong when he wrote this stats. Just change rtpstats.h to store clock_rate as a gint, this is a superset of gstrtpjitterbuffer (gint32) and rtpsource (gint). I've check other places, like in rtpbin, they use uint but that's taken from the caps, so that's correct.
Created attachment 354698 [details] [review] rtpstats: fix assertion 'denom > 0' failed It fixes the issue and all tests in gst-plugins-good and gst-rtsp-server still pass.
Review of attachment 354698 [details] [review]: Good.
Thanks. Attachment 354698 [details] pushed as afbabae - rtpstats: fix assertion 'denom > 0' failed
Can I push above patch to 1.12 branch ?
Sure
commit c9465db1b73432a92f49f59911219aed60a11407 Author: Julien Isorce <jisorce@oblong.com> AuthorDate: Tue Jun 27 15:59:18 2017 +0100 Commit: Julien Isorce <jisorce@oblong.com> CommitDate: Tue Jul 25 10:24:11 2017 +0100 rtpstats: fix assertion 'denom > 0' failed gst_util_uint64_scale_int takes a gint as denom parameter whereas ctx->clock_rate is a guint32. It happens when gst_rtp_packet_rate_ctx_reset set clock_rate to -1. So just define clock_rate as gint like it is done in rtpsource.h https://bugzilla.gnome.org/show_bug.cgi?id=784250