After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 515193 - possible gst_caps_intersect zig-zagging regression
possible gst_caps_intersect zig-zagging regression
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-08 12:59 UTC by Tim-Philipp Müller
Modified: 2008-02-08 13:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2008-02-08 12:59:27 UTC
Consider this code:

GstCaps *
gst_caps_intersect (const GstCaps * caps1, const GstCaps * caps2)
{
  guint64 i;                    /* index can be up to 2 * G_MAX_UINT */
  guint j, k;
  ...
  for (i = 0; i < caps1->structs->len + caps2->structs->len - 1; i++) {
    /* caps1 index goes from 0 to caps1->structs->len-1 */
    j = MIN (i, caps1->structs->len - 1);
    /* caps2 index stays 0 until i reaches caps1->structs->len, then it counts
     * up from 1 to caps2->structs->len - 1 */
    k = MAX (0, i - j);
    ...
  }
  ...

and this compiler warning (refering to the k = ... line):

gstcaps.c: In function 'gst_caps_intersect':
gstcaps.c:1254: warning: comparison of unsigned expression < 0 is always false

and this commit:

http://webcvs.freedesktop.org/gstreamer/gstreamer/gst/gstcaps.c?r1=1.149&r2=1.150

I wonder if this still works like it was supposed to.
Comment 1 Tim-Philipp Müller 2008-02-08 13:13:43 UTC
Seems to, at least according to printf, sorry for the noise.