GNOME Bugzilla – Bug 729114
audiodecoder: default caps nego will manually fixate non-mutable caps
Last modified: 2014-04-29 07:58:51 UTC
Created attachment 275355 [details] [review] Simple oneliner to make caps writable. gst_audio_decoder_negotiate_default_caps iterates over allowed caps and manually fixates audio channels and rate using either gst_structure_set or gst_structure_fixate_field_nearest_int. The latter asserts that the structure (parent caps) is mutable, which can fail. Attached is a patch that makes the caps writable before manually fixating. You might want to rewrite the whole function. Iterating over all internal structures before calling gst_caps_fixate which will truncate the caps anyway seems a bit of a waste.
commit 7c97a1c6cffbdc516ced11f7743c4292eae91e1d Author: Haakon Sporsheim <haakon@pexip.com> Date: Tue Apr 29 09:58:21 2014 +0200 audiodecoder: Make caps writable before fixating https://bugzilla.gnome.org/show_bug.cgi?id=729114