/* if peer returns ANY caps, return filtered src pad template caps */
caps = gst_pad_get_pad_template_caps (srcpad);
- if (filter) {
- GstCaps *intersection = gst_caps_intersect_full (filter, caps,
- GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
- }
} else {
} else {
/* no peer, our padtemplate is enough then */
caps = gst_pad_get_pad_template_caps (pad);
- if (filter) {
- GstCaps *intersection;
+ }
- intersection =
- gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
- }
+ if (filter) {
+ GstCaps *intersection;
+
+ intersection =
+ gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
+ gst_caps_unref (caps);
+ caps = intersection;
}
GST_DEBUG_OBJECT (render, "returning %" GST_PTR_FORMAT, caps);
/* if peer returns ANY caps, return filtered sink pad template caps */
caps = gst_pad_get_pad_template_caps (sinkpad);
- if (filter) {
- GstCaps *intersection = gst_caps_intersect_full (filter, caps,
- GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
- }
-
} else {
/* return upstream caps + composition feature + upstream caps
} else {
/* no peer, our padtemplate is enough then */
caps = gst_pad_get_pad_template_caps (pad);
- if (filter) {
- GstCaps *intersection;
+ }
- intersection =
- gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
- gst_caps_unref (caps);
- caps = intersection;
- }
+ if (filter) {
+ GstCaps *intersection = gst_caps_intersect_full (filter, caps,
+ GST_CAPS_INTERSECT_FIRST);
+ gst_caps_unref (caps);
+ caps = intersection;
}
GST_DEBUG_OBJECT (render, "returning %" GST_PTR_FORMAT, caps);