mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
basetransform: If the filtered peer caps are already empty error out early
This commit is contained in:
parent
4d24d4fe2b
commit
2f93cee988
1 changed files with 25 additions and 19 deletions
|
@ -1006,7 +1006,7 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad,
|
||||||
|
|
||||||
peercaps = gst_pad_query_caps (otherpeer, othercaps);
|
peercaps = gst_pad_query_caps (otherpeer, othercaps);
|
||||||
GST_DEBUG_OBJECT (trans, "Resulted in %" GST_PTR_FORMAT, peercaps);
|
GST_DEBUG_OBJECT (trans, "Resulted in %" GST_PTR_FORMAT, peercaps);
|
||||||
|
if (!gst_caps_is_empty (peercaps)) {
|
||||||
templ_caps = gst_pad_get_pad_template_caps (otherpad);
|
templ_caps = gst_pad_get_pad_template_caps (otherpad);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (trans,
|
GST_DEBUG_OBJECT (trans,
|
||||||
|
@ -1015,7 +1015,8 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad,
|
||||||
intersection =
|
intersection =
|
||||||
gst_caps_intersect_full (peercaps, templ_caps,
|
gst_caps_intersect_full (peercaps, templ_caps,
|
||||||
GST_CAPS_INTERSECT_FIRST);
|
GST_CAPS_INTERSECT_FIRST);
|
||||||
GST_DEBUG_OBJECT (trans, "Intersection: %" GST_PTR_FORMAT, intersection);
|
GST_DEBUG_OBJECT (trans, "Intersection: %" GST_PTR_FORMAT,
|
||||||
|
intersection);
|
||||||
gst_caps_unref (peercaps);
|
gst_caps_unref (peercaps);
|
||||||
gst_caps_unref (templ_caps);
|
gst_caps_unref (templ_caps);
|
||||||
peercaps = intersection;
|
peercaps = intersection;
|
||||||
|
@ -1025,10 +1026,15 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad,
|
||||||
intersection =
|
intersection =
|
||||||
gst_caps_intersect_full (peercaps, othercaps,
|
gst_caps_intersect_full (peercaps, othercaps,
|
||||||
GST_CAPS_INTERSECT_FIRST);
|
GST_CAPS_INTERSECT_FIRST);
|
||||||
GST_DEBUG_OBJECT (trans, "Intersection: %" GST_PTR_FORMAT, intersection);
|
GST_DEBUG_OBJECT (trans, "Intersection: %" GST_PTR_FORMAT,
|
||||||
|
intersection);
|
||||||
gst_caps_unref (peercaps);
|
gst_caps_unref (peercaps);
|
||||||
gst_caps_unref (othercaps);
|
gst_caps_unref (othercaps);
|
||||||
othercaps = intersection;
|
othercaps = intersection;
|
||||||
|
} else {
|
||||||
|
othercaps = peercaps;
|
||||||
|
}
|
||||||
|
|
||||||
is_fixed = gst_caps_is_fixed (othercaps);
|
is_fixed = gst_caps_is_fixed (othercaps);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (trans, "no peer, doing passthrough");
|
GST_DEBUG_OBJECT (trans, "no peer, doing passthrough");
|
||||||
|
|
Loading…
Reference in a new issue