mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
videoaggregator: simplifies and improves sink_get_caps.
The problem here was that after removing the formats and all the things we could convert, we then intersected these caps with the template caps. Hence if a subclass offered permissive sink templates (eg all the possible formats videoconvert handles), but only one output format, then at negotiation time getcaps returned caps with the format restricted to that format, even though we do handle conversion. https://bugzilla.gnome.org/show_bug.cgi?id=751255
This commit is contained in:
parent
55a5c5f7df
commit
1248b00c80
1 changed files with 6 additions and 8 deletions
|
@ -842,7 +842,6 @@ gst_videoaggregator_pad_sink_getcaps (GstPad * pad, GstVideoAggregator * vagg,
|
|||
{
|
||||
GstCaps *srccaps;
|
||||
GstCaps *template_caps;
|
||||
GstCaps *filtered_caps;
|
||||
GstCaps *returned_caps;
|
||||
GstStructure *s;
|
||||
gboolean had_current_caps = TRUE;
|
||||
|
@ -870,14 +869,13 @@ gst_videoaggregator_pad_sink_getcaps (GstPad * pad, GstVideoAggregator * vagg,
|
|||
NULL);
|
||||
}
|
||||
|
||||
filtered_caps = srccaps;
|
||||
if (filter)
|
||||
filtered_caps = gst_caps_intersect (srccaps, filter);
|
||||
returned_caps = gst_caps_intersect (filtered_caps, template_caps);
|
||||
if (filter) {
|
||||
returned_caps = gst_caps_intersect (srccaps, filter);
|
||||
gst_caps_unref (srccaps);
|
||||
} else {
|
||||
returned_caps = srccaps;
|
||||
}
|
||||
|
||||
gst_caps_unref (srccaps);
|
||||
if (filter)
|
||||
gst_caps_unref (filtered_caps);
|
||||
if (had_current_caps)
|
||||
gst_caps_unref (template_caps);
|
||||
|
||||
|
|
Loading…
Reference in a new issue