capssetter: Prevent unneeded caps copying and allocation

This commit is contained in:
Sebastian Dröge 2013-03-25 10:12:03 +01:00
parent 766c5b22ed
commit 56062768af

View file

@ -204,9 +204,9 @@ gst_caps_setter_transform_caps (GstBaseTransform * trans,
/* pass filter caps upstream, or any if no filter */
if (direction != GST_PAD_SINK) {
if (!cfilter || gst_caps_is_empty (cfilter)) {
return gst_caps_new_any ();
return gst_caps_ref (GST_CAPS_ANY);
} else {
return gst_caps_copy (cfilter);
return gst_caps_ref (cfilter);
}
}