adder: fix getcaps function

Explicitely get the possible caps in the sinkpad instead of using an old removed
function.
This commit is contained in:
Wim Taymans 2011-05-08 13:24:30 +02:00
parent d9871e3a51
commit df54ba57a9

View file

@ -174,9 +174,16 @@ gst_adder_sink_getcaps (GstPad * pad)
/* get the downstream possible caps */
peercaps = gst_pad_peer_get_caps (adder->srcpad);
/* get the allowed caps on this sinkpad, we use the fixed caps function so
* that it does not call recursively in this function. */
sinkcaps = gst_pad_get_fixed_caps_func (pad);
/* get the allowed caps on this sinkpad */
sinkcaps = gst_pad_get_current_caps (pad);
if (sinkcaps == NULL) {
sinkcaps = (GstCaps *) gst_pad_get_pad_template_caps (pad);
if (sinkcaps)
gst_caps_ref (sinkcaps);
else
sinkcaps = gst_caps_new_any ();
}
if (peercaps) {
/* restrict with filter-caps if any */
if (filter_caps) {