From: Olivier CrĂȘte Date: Fri, 18 Nov 2016 19:44:16 +0000 (-0500) Subject: aggregator: Request pad templates which are not request pad X-Git-Tag: 1.16.2~574^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a001f6d58710db2848c415402424f1b34ee9f5d6;hp=6eda156b2041175dc3e88ea6cfb842b9ce5089b1;p=platform%2Fupstream%2Fgstreamer.git aggregator: Request pad templates which are not request pad https://bugzilla.gnome.org/show_bug.cgi?id=782920 --- diff --git a/libs/gst/base/gstaggregator.c b/libs/gst/base/gstaggregator.c index 28bdde0..ec4be92 100644 --- a/libs/gst/base/gstaggregator.c +++ b/libs/gst/base/gstaggregator.c @@ -1606,6 +1606,9 @@ gst_aggregator_default_create_new_pad (GstAggregator * self, if (templ->direction != GST_PAD_SINK) goto not_sink; + if (templ->presence != GST_PAD_REQUEST) + goto not_request; + GST_OBJECT_LOCK (self); if (req_name == NULL || strlen (req_name) < 6 || !g_str_has_prefix (req_name, "sink_")) { @@ -1630,7 +1633,12 @@ gst_aggregator_default_create_new_pad (GstAggregator * self, /* errors */ not_sink: { - GST_WARNING_OBJECT (self, "request new pad that is not a SINK pad\n"); + GST_WARNING_OBJECT (self, "request new pad that is not a SINK pad"); + return NULL; + } +not_request: + { + GST_WARNING_OBJECT (self, "request new pad that is not a REQUEST pad"); return NULL; } }