mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
basetextoverlay: always intersect with the filter caps
Avoids returning values that upstream can't produce https://bugzilla.gnome.org/show_bug.cgi?id=733916
This commit is contained in:
parent
c9904fb639
commit
c20e044ef0
1 changed files with 6 additions and 15 deletions
|
@ -1187,16 +1187,8 @@ gst_base_text_overlay_get_videosink_caps (GstPad * pad,
|
||||||
GST_DEBUG_OBJECT (pad, "peer caps %" GST_PTR_FORMAT, peer_caps);
|
GST_DEBUG_OBJECT (pad, "peer caps %" GST_PTR_FORMAT, peer_caps);
|
||||||
|
|
||||||
if (gst_caps_is_any (peer_caps)) {
|
if (gst_caps_is_any (peer_caps)) {
|
||||||
|
|
||||||
/* if peer returns ANY caps, return filtered src pad template caps */
|
/* if peer returns ANY caps, return filtered src pad template caps */
|
||||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (srcpad));
|
caps = gst_caps_copy (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 {
|
||||||
|
|
||||||
/* duplicate caps which contains the composition into one version with
|
/* duplicate caps which contains the composition into one version with
|
||||||
|
@ -1212,15 +1204,14 @@ gst_base_text_overlay_get_videosink_caps (GstPad * pad,
|
||||||
} else {
|
} else {
|
||||||
/* no peer, our padtemplate is enough then */
|
/* no peer, our padtemplate is enough then */
|
||||||
caps = gst_pad_get_pad_template_caps (pad);
|
caps = gst_pad_get_pad_template_caps (pad);
|
||||||
if (filter) {
|
}
|
||||||
GstCaps *intersection;
|
|
||||||
|
|
||||||
intersection =
|
if (filter) {
|
||||||
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
GstCaps *intersection = gst_caps_intersect_full (filter, caps,
|
||||||
|
GST_CAPS_INTERSECT_FIRST);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
caps = intersection;
|
caps = intersection;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (overlay, "returning %" GST_PTR_FORMAT, caps);
|
GST_DEBUG_OBJECT (overlay, "returning %" GST_PTR_FORMAT, caps);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue