mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
basetransform: Minor refactoring
Move checks related to peerfilter in one place. No impact except for logic. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/484>
This commit is contained in:
parent
3c7db917dd
commit
8076051a19
1 changed files with 20 additions and 17 deletions
|
@ -652,7 +652,8 @@ gst_base_transform_query_caps (GstBaseTransform * trans, GstPad * pad,
|
||||||
GST_DEBUG_OBJECT (pad, "transformed %" GST_PTR_FORMAT, peerfilter);
|
GST_DEBUG_OBJECT (pad, "transformed %" GST_PTR_FORMAT, peerfilter);
|
||||||
gst_caps_unref (temp);
|
gst_caps_unref (temp);
|
||||||
|
|
||||||
if (peerfilter && !gst_caps_is_empty (peerfilter)) {
|
if (peerfilter) {
|
||||||
|
if (!gst_caps_is_empty (peerfilter)) {
|
||||||
/* and filter against the template of the other pad */
|
/* and filter against the template of the other pad */
|
||||||
GST_DEBUG_OBJECT (pad, "our template %" GST_PTR_FORMAT, otempl);
|
GST_DEBUG_OBJECT (pad, "our template %" GST_PTR_FORMAT, otempl);
|
||||||
/* We keep the caps sorted like the returned caps */
|
/* We keep the caps sorted like the returned caps */
|
||||||
|
@ -663,16 +664,18 @@ gst_base_transform_query_caps (GstBaseTransform * trans, GstPad * pad,
|
||||||
gst_caps_unref (peerfilter);
|
gst_caps_unref (peerfilter);
|
||||||
peerfilter = temp;
|
peerfilter = temp;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (pad, "peer filter caps %" GST_PTR_FORMAT, peerfilter);
|
|
||||||
|
|
||||||
|
/* If we filter out everything, bail out */
|
||||||
if (peerfilter && gst_caps_is_empty (peerfilter)) {
|
if (peerfilter && gst_caps_is_empty (peerfilter)) {
|
||||||
GST_DEBUG_OBJECT (pad, "peer filter caps are empty");
|
GST_DEBUG_OBJECT (pad, "peer filter caps are empty");
|
||||||
caps = peerfilter;
|
caps = peerfilter;
|
||||||
peerfilter = NULL;
|
peerfilter = NULL;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (pad, "peer filter caps %" GST_PTR_FORMAT, peerfilter);
|
||||||
|
|
||||||
/* query the peer with the transformed filter */
|
/* query the peer with the transformed filter */
|
||||||
peercaps = gst_pad_peer_query_caps (otherpad, peerfilter);
|
peercaps = gst_pad_peer_query_caps (otherpad, peerfilter);
|
||||||
|
|
Loading…
Reference in a new issue