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 564863 - Caps are not propagated from a ghostpad's target to the ghostpad
Caps are not propagated from a ghostpad's target to the ghostpad
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-17 15:03 UTC by Alessandro Decina
Modified: 2009-01-09 23:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test & fix (5.17 KB, patch)
2008-12-17 15:03 UTC, Alessandro Decina
none Details | Review

Description Alessandro Decina 2008-12-17 15:03:20 UTC
The attached patch fixes the following case:

	src = gst_pad_new_from_template (src_template, "src");
	ghost_src = gst_ghost_pad_new ("ghostsrc", src);
	sink = gst_pad_new_from_template (sink_template, "sink");
	fail_unless (gst_pad_link (ghost_src, sink) == GST_PAD_LINK_OK);

	caps1 = gst_caps_from_string ("meh");
	fail_unless (gst_pad_set_caps (src, caps1));

	caps2 = GST_PAD_CAPS (ghost_src);
	fail_unless (gst_caps_is_equal (caps1, caps2));
	gst_caps_unref (caps1);

The bug is noticeable with decodebin2. Once you get a new decoded pad
with unfixed caps, if you connect to the pad's notify::caps signal the callback is never called even if there is data flow.
Comment 1 Alessandro Decina 2008-12-17 15:03:45 UTC
Created attachment 124865 [details] [review]
test & fix
Comment 2 Alessandro Decina 2008-12-17 16:22:18 UTC
ipse dixit:

(04:23:38 PM) wtay: twi_, I think the patch should only forward the caps notify from src ghostpads
(04:25:05 PM) wtay: twi_, if not, you'll get it twice from ghost sinkpads, once when the sinkpad gets caps, then when the target gets caps

Added a check for this, fixed and committed.

2008-12-17  Alessandro Decina  <alessandro.decina@collabora.co.uk>

        * gst/gstghostpad.c:
        * tests/check/gst/gstghostpad.c:
        In a source ghostpad, when caps are changed in the target pad, the
        change needs to be reflected in the ghostpad.
        Fixes #564863.