• Henry Wilkes's avatar
    caps: fix is_strictly_equal · 407e3258
    Henry Wilkes authored
    Fixed gst_caps_is_strictly_equal() to take into account whether either of
    the caps are ANY caps. Previously, two ANY caps could be considered not
    strictly equal if one of them still contained some remnant *internal*
    structure (this can happen if an ANY caps has emerged from an append or
    merge operation). Also, an ANY caps with no remnant internal structures
    was considered strictly equal to an EMPTY caps. Similarly, a non-ANY caps
    was considered strictly equal to an ANY caps if its remnant internal
    structures happened to match.
    
    Also changed gst_caps_is_fixed to take into account that an ANY caps
    should not be considered fixed even if it contains a single remnant
    internal fixed structure. This affects gst_caps_is_equal(), which uses a
    separate method if both caps are fixed. Previously, this meant that a
    non-ANY fixed caps was considered equal to an ANY caps if it contained a
    single matching remnant internal structure.
    
    Added some tests for these two equality methods, which covers the above
    examples, as well as asserts existing behaviour.
    
    Fixes #496
    407e3258
gstcaps.c 58.5 KB