GNOME Bugzilla – Bug 564863
Caps are not propagated from a ghostpad's target to the ghostpad
Last modified: 2009-01-09 23:29:32 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.
Created attachment 124865 [details] [review] test & fix
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.