From 37e2fb10546c4135aa2afc6dc083564ee12574a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 5 Aug 2010 01:06:57 +0100 Subject: [PATCH] gstutils: Make gst_pad_proxy_getcaps() return empty caps if it's what the other side has gst_pad_proxy_getcaps() would return the pad template caps if the other side returned empty caps or if the intersection of all the caps on the other side was empty. https://bugzilla.gnome.org/show_bug.cgi?id=624203 --- gst/gstutils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/gstutils.c b/gst/gstutils.c index 7b3ac98..70016b4 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -2745,9 +2745,11 @@ gst_pad_proxy_getcaps (GstPad * pad) case GST_ITERATOR_DONE: /* all pads iterated, return collected value */ goto done; + case GST_ITERATOR_OK: + /* premature exit (happens if caps intersection is empty) */ + goto done; default: - /* iterator returned _ERROR or premature end with _OK, - * mark an error and exit */ + /* iterator returned _ERROR, mark an error and exit */ if ((caps = g_value_get_pointer (&ret))) gst_caps_unref (caps); g_value_set_pointer (&ret, NULL); -- 2.7.4