GNOME Bugzilla – Bug 664221
[baseparse] ::sink_get_caps() vfunc breaks API/ABI
Last modified: 2011-11-23 12:48:49 UTC
> + if (klass->get_sink_caps) > + caps = klass->get_sink_caps (parse); > + else > + caps = gst_pad_proxy_getcaps (pad); this is completely breaking backwards compatibility with the old baseparse subclasses. Let's take two examples: 1) h264parse allows to convert between different stream-formats. If downstream now requires a specific stream-format, gst_pad_proxy_getcaps() will propagate this singla stream-format to upstream and if upstream wants to provide something different negotiation will fail. But it shouldn't, h264parse can convert between the stream-formats. f3f9e4b9786d00299e0c6909180c4cd326489bdf fixes this in h264parse but it's nonetheless API/ABI breakage. 2) Consider a parser and downstream requests parsed=true on the caps. gst_pad_proxy_getcaps() will propagate the parsed=true field to the sinkpad caps and if upstream provides unparsed input negotiation will fail again.
commit aa9ba2dd4e7167f00c48fee1fddbe5b02426ed5f Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Wed Nov 23 13:42:56 2011 +0100 baseparse: Return template caps instead of other side's peer caps if get_sink_caps vfunc is not implemented Using gst_pad_proxy_get_caps() breaks backwards compatibility with old parsers because it will propagate the other side's fields like "parsed" and "framed" and also breaks parser/converters. Fixes bug #664221.