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
This commit is contained in:
Olivier Crête 2010-08-05 01:06:57 +01:00 committed by Tim-Philipp Müller
parent 3fc35ac763
commit 37e2fb1054

View file

@ -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);