[Bug 693365] New: gst_structure_is_subset false positive

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Feb 7 13:49:57 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=693365
  GStreamer | gstreamer (core) | git

           Summary: gst_structure_is_subset false positive
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: shatrov at gmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


gst_structure_is_subset() function returns TRUE for the following pair of
structures:
 SUPERSET: video/x-h264, parsed=(boolean)true
 SUBSET:   video/x-h264, stream-format=(string)byte-stream,
alignment=(string)nal

It should return FALSE, since there's no parse=(boolean)true in SUBSET.

According to the docs, gst_structure_is_subset() does the following:
 * Checks if @subset is a subset of @superset, i.e. has the same
 * structure name and for all fields that are existing in @superset,
 * @subset has a value that is a subset of the value in @superset.

In this example, @superset contains parsed=true field, and @subset does not
contain a "parsed" field. Therefore, @subset does not have a value which is a
subset of the value in @superset for that field.

The relevant part of gst_structure_is_subset() is this line:
  return gst_structure_foreach ((GstStructure *) subset,
      gst_caps_structure_is_subset_field, (gpointer) superset);

>From the above line, it is clear that either the docs should say "for all
fields that are existing in @subset, ..." or gst_structure_is_subset() should
be fixed to act as described in the docs.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list