From 7ac883cebfe9828f94c5693c55247065cc61c4f6 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 3 Mar 2017 16:20:15 +0200 Subject: [PATCH] videoaggregator: redo src caps negotiation if a sink pad's caps have changed in the meantime https://bugzilla.gnome.org/show_bug.cgi?id=755782 --- gst-libs/gst/video/gstvideoaggregator.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index ea2d10448b..2abb4d569b 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -1448,6 +1448,7 @@ gst_video_aggregator_check_reconfigure (GstVideoAggregator * vagg, || gst_pad_check_reconfigure (GST_AGGREGATOR_SRC_PAD (vagg))) { gboolean ret; + restart: ret = gst_video_aggregator_update_src_caps (vagg); if (!ret) { gst_pad_mark_reconfigure (GST_AGGREGATOR_SRC_PAD (vagg)); @@ -1486,6 +1487,13 @@ gst_video_aggregator_check_reconfigure (GstVideoAggregator * vagg, else return GST_FLOW_NOT_NEGOTIATED; } + } else { + /* It is possible that during gst_video_aggregator_update_src_caps() + * we got a caps change on one of the sink pads, in which case we need + * to redo the negotiation + * - https://bugzilla.gnome.org/show_bug.cgi?id=755782 */ + if (gst_pad_check_reconfigure (GST_AGGREGATOR_SRC_PAD (vagg))) + goto restart; } }