rtpstats: fix unsigned integer comparisons.
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Tue, 8 Aug 2017 11:11:58 +0000 (13:11 +0200)
committerMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Fri, 11 Aug 2017 11:29:24 +0000 (13:29 +0200)
commit5e48e85fb7db4c31b5652c9a002574f2879da191
treea707bde1178fadaf45947fa4b5fcfc36635826ca
parentbc1c321b272cb6804e97ed2b8e94f606ba2fde11
rtpstats: fix unsigned integer comparisons.

Callers of the API (rtpsource, rtpjitterbuffer) pass clock_rate
as a signed integer, and the comparison "<= 0" is used against
it, leading me to think the intention was to have the field
be typed as gint32, not guint32.

This led to situations where we could call scale_int with
a MAX_UINT32 (-1) guint32 as the denom, thus raising an
assertion.

https://bugzilla.gnome.org/show_bug.cgi?id=785991
gst/rtpmanager/rtpstats.c
gst/rtpmanager/rtpstats.h