mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
video-aggregator: Fix renegotiation when using convert pads
Since 23189c60f4
we started using the
useless result of `modified_caps` which, was never used since it was
introduced 7 years ago (in videomixer2). The intersection is useless and
we should just avoid doing it at all (which was always the case before)
as it can end up failing renegotiation for bad reasons.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/905>
This commit is contained in:
parent
d944c27d96
commit
69b5cb8a10
1 changed files with 3 additions and 15 deletions
|
@ -2491,10 +2491,7 @@ gst_video_aggregator_pad_sink_acceptcaps (GstPad * pad,
|
|||
GstVideoAggregator * vagg, GstCaps * caps)
|
||||
{
|
||||
gboolean ret;
|
||||
GstCaps *modified_caps;
|
||||
GstCaps *accepted_caps;
|
||||
GstCaps *template_caps;
|
||||
gboolean had_current_caps = TRUE;
|
||||
gint i, n;
|
||||
GstStructure *s;
|
||||
GstAggregator *agg = GST_AGGREGATOR (vagg);
|
||||
|
@ -2503,12 +2500,8 @@ gst_video_aggregator_pad_sink_acceptcaps (GstPad * pad,
|
|||
|
||||
accepted_caps = gst_pad_get_current_caps (GST_PAD (agg->srcpad));
|
||||
|
||||
template_caps = gst_pad_get_pad_template_caps (GST_PAD (agg->srcpad));
|
||||
|
||||
if (accepted_caps == NULL) {
|
||||
accepted_caps = template_caps;
|
||||
had_current_caps = FALSE;
|
||||
}
|
||||
if (accepted_caps == NULL)
|
||||
accepted_caps = gst_pad_get_pad_template_caps (GST_PAD (agg->srcpad));
|
||||
|
||||
accepted_caps = gst_caps_make_writable (accepted_caps);
|
||||
|
||||
|
@ -2528,15 +2521,10 @@ gst_video_aggregator_pad_sink_acceptcaps (GstPad * pad,
|
|||
}
|
||||
}
|
||||
|
||||
modified_caps = gst_caps_intersect (accepted_caps, template_caps);
|
||||
|
||||
ret = gst_caps_can_intersect (caps, modified_caps);
|
||||
ret = gst_caps_can_intersect (caps, accepted_caps);
|
||||
GST_DEBUG_OBJECT (pad, "%saccepted caps %" GST_PTR_FORMAT,
|
||||
(ret ? "" : "not "), caps);
|
||||
gst_caps_unref (accepted_caps);
|
||||
gst_caps_unref (modified_caps);
|
||||
if (had_current_caps)
|
||||
gst_caps_unref (template_caps);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue