pulse: Get caps correctly on pad block

Instead of always going upstream, we should first see if already got
caps from a setcaps() call.

https://bugzilla.gnome.org/show_bug.cgi?id=661262
This commit is contained in:
Arun Raghavan 2011-10-18 18:31:17 +05:30
parent e9ad06e202
commit a7790efd04

View file

@ -653,7 +653,14 @@ proxypad_blocked_cb (GstPad * pad, gboolean blocked, gpointer data)
if (!pbin->format_lost) {
sinkpad = gst_element_get_static_pad (GST_ELEMENT (pbin->psink), "sink");
caps = gst_pad_get_caps_reffed (pad);
if (GST_PAD_CAPS (pbin->sinkpad)) {
/* See if we already got caps on our sinkpad */
caps = gst_caps_ref (GST_PAD_CAPS (pbin->sinkpad));
} else {
/* We haven't, so get caps from upstream */
caps = gst_pad_get_caps_reffed (pad);
}
if (gst_pad_accept_caps (sinkpad, caps)) {
if (pbin->dbin2) {