[gstreamer-bugs] [Bug 515193] New: possible gst_caps_intersect zig-zagging regression

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Feb 8 05:01:01 PST 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=515193

  GStreamer | gstreamer (core) | Ver: HEAD CVS
           Summary: possible gst_caps_intersect zig-zagging regression
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: t.i.m at zen.co.uk
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


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.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=515193.




More information about the Gstreamer-bugs mailing list