GNOME Bugzilla – Bug 595886
gst_pad_fixate_caps() does not return fixed caps in case of multiple structures
Last modified: 2009-10-28 17:57:28 UTC
The default gst_pad_fixate_caps() previously would only fixate each individual struct. But in case there are multiple structs, the resulting caps would still not be fixed. In the spirit of how individual structs are fixated, this patch changes gst_pad_fixate_caps() to remove all but the first struct. This issue shows up, for example, when using a pipeline with a video decoder updated to support video/x-raw-yuv and video/x-raw-yuv-strided with a video sink that supports both (or ANY caps, such as fakesink)
Created attachment 143645 [details] [review] make gst_pad_fixate_caps() return fixed caps even if there are multiple structs
You could use gst_caps_truncate() instead of your loop. That will remove all but the first structure. Apart from that this patch probably makes sense :)
Created attachment 143691 [details] [review] updated patch to use gst_caps_truncate() updated patch to use gst_caps_truncate()
Will commit after freeze.
commit 746284f8071c2f33a488eaecfc6f6a1d88cf32c9 Author: Rob Clark <rob@ti.com> Date: Wed Sep 9 15:37:11 2009 -0500 pad: make _fixate_caps() also truncate when needed The default gst_pad_fixate_caps() previously would only fixate each individual struct. In case there are multiple structs, the resulting caps would still not be fixed. In the spirit of how individual structs are fixated, this patch changes gst_pad_fixate_caps() to remove all but the first struct. Fixes #595886