mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 08:08:22 +00:00
dvbsuboverlay: always intersect with the filter in getcaps
Avoids returning unsupported caps to peers https://bugzilla.gnome.org/show_bug.cgi?id=733916
This commit is contained in:
parent
44e84025d7
commit
627b6ac461
1 changed files with 14 additions and 27 deletions
|
@ -550,12 +550,6 @@ gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay * render, GstPad * pad,
|
|||
|
||||
/* if peer returns ANY caps, return filtered src pad template caps */
|
||||
caps = 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 {
|
||||
|
||||
|
@ -572,14 +566,15 @@ gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay * render, GstPad * pad,
|
|||
} else {
|
||||
/* no peer, our padtemplate is enough then */
|
||||
caps = gst_pad_get_pad_template_caps (pad);
|
||||
if (filter) {
|
||||
GstCaps *intersection;
|
||||
}
|
||||
|
||||
intersection =
|
||||
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (caps);
|
||||
caps = intersection;
|
||||
}
|
||||
if (filter) {
|
||||
GstCaps *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);
|
||||
|
@ -618,13 +613,6 @@ gst_dvbsub_overlay_get_src_caps (GstDVBSubOverlay * render, GstPad * pad,
|
|||
|
||||
/* if peer returns ANY caps, return filtered sink pad template caps */
|
||||
caps = 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 {
|
||||
|
||||
/* return upstream caps + composition feature + upstream caps
|
||||
|
@ -640,14 +628,13 @@ gst_dvbsub_overlay_get_src_caps (GstDVBSubOverlay * render, GstPad * pad,
|
|||
} else {
|
||||
/* no peer, our padtemplate is enough then */
|
||||
caps = gst_pad_get_pad_template_caps (pad);
|
||||
if (filter) {
|
||||
GstCaps *intersection;
|
||||
}
|
||||
|
||||
intersection =
|
||||
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (caps);
|
||||
caps = intersection;
|
||||
}
|
||||
if (filter) {
|
||||
GstCaps *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);
|
||||
|
|
Loading…
Reference in a new issue