ghostpad: If we don't control a pad/template, return proper caps

If there's a filter, we can return that in _get_caps()
This commit is contained in:
Edward Hervey 2011-10-10 17:04:39 +02:00
parent 86656b44af
commit 009bc19528

View file

@ -352,6 +352,12 @@ gst_proxy_pad_getcaps_default (GstPad * pad, GstCaps * filter)
goto done;
}
/* If there's a filter, return that */
if (filter != NULL) {
res = gst_caps_ref (filter);
goto done;
}
/* last resort, any caps */
GST_DEBUG_OBJECT (pad, "pad has no template, returning ANY");
res = gst_caps_new_any ();