From: Arun Raghavan Date: Tue, 18 Oct 2011 13:01:17 +0000 (+0530) Subject: pulse: Get caps correctly on pad block X-Git-Tag: 1.19.3~509^2~7136^2~305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7790efd04c463fe20a1d829d140cf3b40af8548;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/ext/pulse/pulseaudiosink.c b/ext/pulse/pulseaudiosink.c index b7e1a07..bfd5483 100644 --- a/ext/pulse/pulseaudiosink.c +++ b/ext/pulse/pulseaudiosink.c @@ -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) {