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 595886 - gst_pad_fixate_caps() does not return fixed caps in case of multiple structures
gst_pad_fixate_caps() does not return fixed caps in case of multiple structures
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-21 23:06 UTC by Rob Clark
Modified: 2009-10-28 17:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make gst_pad_fixate_caps() return fixed caps even if there are multiple structs (1.45 KB, patch)
2009-09-21 23:07 UTC, Rob Clark
needs-work Details | Review
updated patch to use gst_caps_truncate() (1.44 KB, patch)
2009-09-22 12:37 UTC, Rob Clark
none Details | Review

Description Rob Clark 2009-09-21 23:06:35 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)
Comment 1 Rob Clark 2009-09-21 23:07:12 UTC
Created attachment 143645 [details] [review]
make gst_pad_fixate_caps() return fixed caps even if there are multiple structs
Comment 2 Sebastian Dröge (slomo) 2009-09-22 06:17:15 UTC
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 :)
Comment 3 Rob Clark 2009-09-22 12:37:09 UTC
Created attachment 143691 [details] [review]
updated patch to use gst_caps_truncate()

updated patch to use gst_caps_truncate()
Comment 4 Wim Taymans 2009-09-24 12:53:03 UTC
Will commit after freeze.
Comment 5 Wim Taymans 2009-10-28 17:57:28 UTC
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