mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
assrender: always intersect with the filter caps
Avoids returning values that peers can't use https://bugzilla.gnome.org/show_bug.cgi?id=733916
This commit is contained in:
parent
eee178988a
commit
7895d88369
1 changed files with 14 additions and 27 deletions
|
@ -612,13 +612,6 @@ gst_ass_render_get_videosink_caps (GstPad * pad, GstCaps * filter)
|
||||||
|
|
||||||
/* 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
|
||||||
|
@ -634,14 +627,13 @@ gst_ass_render_get_videosink_caps (GstPad * pad, GstCaps * filter)
|
||||||
} 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_unref (caps);
|
GST_CAPS_INTERSECT_FIRST);
|
||||||
caps = intersection;
|
gst_caps_unref (caps);
|
||||||
}
|
caps = intersection;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (render, "returning %" GST_PTR_FORMAT, caps);
|
GST_DEBUG_OBJECT (render, "returning %" GST_PTR_FORMAT, caps);
|
||||||
|
@ -682,12 +674,6 @@ gst_ass_render_get_src_caps (GstPad * pad, GstCaps * filter)
|
||||||
|
|
||||||
/* if peer returns ANY caps, return filtered sink pad template caps */
|
/* if peer returns ANY caps, return filtered sink pad template caps */
|
||||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (sinkpad));
|
caps = gst_caps_copy (gst_pad_get_pad_template_caps (sinkpad));
|
||||||
if (filter) {
|
|
||||||
GstCaps *intersection = gst_caps_intersect_full (filter, caps,
|
|
||||||
GST_CAPS_INTERSECT_FIRST);
|
|
||||||
gst_caps_unref (caps);
|
|
||||||
caps = intersection;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -704,14 +690,15 @@ gst_ass_render_get_src_caps (GstPad * pad, GstCaps * filter)
|
||||||
} 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_unref (caps);
|
|
||||||
caps = intersection;
|
intersection =
|
||||||
}
|
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
caps = intersection;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (render, "returning %" GST_PTR_FORMAT, caps);
|
GST_DEBUG_OBJECT (render, "returning %" GST_PTR_FORMAT, caps);
|
||||||
|
|
Loading…
Reference in a new issue