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 676547 - regression in caps merge
regression in caps merge
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.36
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-22 10:48 UTC by Levente Farkas
Modified: 2012-05-22 11:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Levente Farkas 2012-05-22 10:48:20 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
-------------------------------
Comment 1 Wim Taymans 2012-05-22 10:54:38 UTC
Why do you think this is wrong?

According to the docs, caps2 is only merged into caps1 if caps1 did not already express caps2.
Comment 2 Levente Farkas 2012-05-22 11:01:27 UTC
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.
Comment 3 Wim Taymans 2012-05-22 11:05:19 UTC
(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)