mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
caps: Handle ANY caps features properly in more places
This commit is contained in:
parent
1de3b0f9e8
commit
91b3890d70
2 changed files with 7 additions and 7 deletions
|
@ -102,7 +102,7 @@ typedef struct _GstCapsImpl
|
|||
#define CAPS_IS_EMPTY_SIMPLE(caps) \
|
||||
((GST_CAPS_ARRAY (caps) == NULL) || (GST_CAPS_LEN (caps) == 0))
|
||||
|
||||
#define gst_caps_features_copy_conditional(f) ((f && !gst_caps_features_is_equal (f, GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) ? gst_caps_features_copy (f) : NULL)
|
||||
#define gst_caps_features_copy_conditional(f) ((f && (gst_caps_features_is_any (f) || !gst_caps_features_is_equal (f, GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))) ? gst_caps_features_copy (f) : NULL)
|
||||
|
||||
/* quick way to get a caps structure at an index without doing a type or array
|
||||
* length check */
|
||||
|
@ -2171,9 +2171,9 @@ gst_caps_to_string (const GstCaps * caps)
|
|||
features = gst_caps_get_features_unchecked (caps, i);
|
||||
|
||||
g_string_append (s, gst_structure_get_name (structure));
|
||||
if (features
|
||||
&& !gst_caps_features_is_equal (features,
|
||||
GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) {
|
||||
if (features && (gst_caps_features_is_any (features)
|
||||
|| !gst_caps_features_is_equal (features,
|
||||
GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))) {
|
||||
g_string_append_c (s, '(');
|
||||
priv_gst_caps_features_append_to_gstring (features, s);
|
||||
g_string_append_c (s, ')');
|
||||
|
|
|
@ -83,9 +83,9 @@ print_caps (const GstCaps * caps, const gchar * pfx)
|
|||
GstStructure *structure = gst_caps_get_structure (caps, i);
|
||||
GstCapsFeatures *features = gst_caps_get_features (caps, i);
|
||||
|
||||
if (features
|
||||
&& !gst_caps_features_is_equal (features,
|
||||
GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) {
|
||||
if (features && (gst_caps_features_is_any (features) ||
|
||||
!gst_caps_features_is_equal (features,
|
||||
GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))) {
|
||||
gchar *features_string = gst_caps_features_to_string (features);
|
||||
|
||||
n_print ("%s%s(%s)\n", pfx, gst_structure_get_name (structure),
|
||||
|
|
Loading…
Reference in a new issue