summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2003-05-08 19:57:06 +0000
committerWim Taymans <wim.taymans@gmail.com>2003-05-08 19:57:06 +0000
commit4a648849181d36fb168416c3a9380ddc8b3146d0 (patch)
tree1ce72d067d11e02203478da6ffb8afaeb6203981
parent6c44f865e85956f095e1a210b39743237ddfc09c (diff)
Fix 112596, gst_caps_is_always_compatible() broken
Original commit message from CVS: Fix 112596, gst_caps_is_always_compatible() broken
-rw-r--r--gst/gstcaps.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gst/gstcaps.c b/gst/gstcaps.c
index 94e668c57..dcff61841 100644
--- a/gst/gstcaps.c
+++ b/gst/gstcaps.c
@@ -756,16 +756,21 @@ gst_caps_is_always_compatible (GstCaps *fromcaps, GstCaps *tocaps)
while (fromcaps) {
GstCaps *destcaps = tocaps;
+ /* assume caps is incompatible */
+ gboolean compat = FALSE;
- while (destcaps) {
- if (gst_caps_check_compatibility_func (fromcaps, destcaps))
- return TRUE;
-
+ while (destcaps && !compat) {
+ if (gst_caps_check_compatibility_func (fromcaps, destcaps)) {
+ compat = TRUE;
+ }
destcaps = destcaps->next;
}
+ if (!compat)
+ return FALSE;
+
fromcaps = fromcaps->next;
}
- return FALSE;
+ return TRUE;
}
static GstCaps*