* don't re-create our possible caps every single time, just use the
template caps.
* don't intersect the caps against the template, basetransform has already
done that for us.
62% speedup of _transform_caps() (instruction calls, measured with callgrind)
s = gst_caps_get_structure (caps, 0);
is_alpha = gst_ffmpegcsp_structure_is_alpha (s);
- template = gst_ffmpegcsp_codectype_to_caps (CODEC_TYPE_VIDEO, NULL);
- result = gst_caps_intersect (caps, template);
+ template = gst_pad_template_get_caps (srctempl);
+ result = gst_caps_copy (caps);
/* Get all possible caps that we can transform to */
tmp = gst_ffmpegcsp_caps_remove_format_info (caps);
tmp2 = gst_caps_intersect (tmp, template);
- gst_caps_unref (template);
gst_caps_unref (tmp);
tmp = tmp2;