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 664221 - [baseparse] ::sink_get_caps() vfunc breaks API/ABI
[baseparse] ::sink_get_caps() vfunc breaks API/ABI
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.36
Other Linux
: Normal blocker
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-16 18:52 UTC by Sebastian Dröge (slomo)
Modified: 2011-11-23 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2011-11-16 18:52:29 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.
Comment 1 Sebastian Dröge (slomo) 2011-11-23 12:48:49 UTC
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.