[Bug 779058] caps: simplify creates invalid caps with sets or ranges, intersect fails even more on them

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Mar 13 13:15:21 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=779058

Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vincent.penquerch at collabora
                   |                            |.co.uk

--- Comment #1 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> ---
I don't quite see that here (on top of
586b34436e889c57f3108e6160f20beb55e61cd7):

#include <gst/gst.h>

#define CAPS "video/x-raw, framerate=(fraction) [3/1, 30/1]; video/x-raw,
framerate=(fraction) [3/1, 120/1]"
int
main (int argc, char **argv)
{
  GstCaps *caps;
  char *s;

  gst_init(&argc, &argv);

  caps = gst_caps_from_string(CAPS);
  s = gst_caps_to_string (caps);
  g_print("caps: %s\n", s);
  g_free (s);
  caps = gst_caps_simplify(caps);
  s = gst_caps_to_string (caps);
  g_print ("simplified: %s\n", s);
  g_free (s);
  gst_caps_unref (caps);

  return 0;
}
$ gcc -Wall -W simplify.c `pkg-config --cflags --libs gstreamer-1.0 glib-2.0`
&& ./a.out 
caps: video/x-raw, framerate=(fraction)[ 3/1, 30/1 ]; video/x-raw,
framerate=(fraction)[ 3/1, 120/1 ]
simplified: video/x-raw, framerate=(fraction){ [ 30/1, 120/1 ], [ 3/1, 30/1 ] }

The non-simplified part above is due to:

#if 0
  /* Implement these if needed */
  gst_value_register_union_func (GST_TYPE_FRACTION, GST_TYPE_FRACTION_RANGE,
      gst_value_union_fraction_fraction_range);
  gst_value_register_union_func (GST_TYPE_FRACTION_RANGE,
      GST_TYPE_FRACTION_RANGE, gst_value_union_fraction_range_fraction_range);
#endif

I still found a bug in the area though.

-- 
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