GNOME Bugzilla – Bug 676547
regression in caps merge
Last modified: 2012-05-22 11:17:47 UTC
this simple test was working on 10.35, but it's no longer works on the latest 10.36: ------------------------------- #include <gst/gst.h> #include <glib.h> int main (int argc, char *argv[]) { GstCaps* caps1; GstCaps* caps2; gst_init (&argc, &argv); caps1 = gst_caps_from_string( "video/x-raw-rgb, bpp=32, depth=24" ); caps2 = gst_caps_from_string( "video/x-raw-rgb, width=640, height=480" ); g_print ("%s\n",gst_caps_to_string (caps1)); g_print ("%s\n\n",gst_caps_to_string (caps2)); gst_caps_merge (caps1, caps2); g_print ("%s\n",gst_caps_to_string (caps1)); g_print ("%s\n",gst_caps_to_string (caps2)); return 0; } ------------------------------- in the previous version it gives: ------------------------------- video/x-raw-rgb, bpp=(int)32, depth=(int)24; video/x-raw-rgb, width=(int)640, height=(int)480 EMPTY ------------------------------- now gives: ------------------------------- video/x-raw-rgb, bpp=(int)32, depth=(int)24 EMPTY -------------------------------
Why do you think this is wrong? According to the docs, caps2 is only merged into caps1 if caps1 did not already express caps2.
first of all it's not working the same way as before so imho it's a regression. second what does the "did not already express" mean? width is not in caps1, so in my read caps1 do not already express it. anyway the same happened with gst_caps_append.
(In reply to comment #2) > first of all it's not working the same way as before so imho it's a regression. It was wrong before, it did the subset wrong and resulted in _append() instead of _merge. What are you doing? maybe you wanted to do _append instead or _merge? > > second what does the "did not already express" mean? width is not in caps1, so > in my read caps1 do not already express it. width is not present in caps1 so it means that the width can be anything (so width=640 is included in caps1)