X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Felements%2Fgstoutputselector.c;h=2b97b98419fcec109113233e4a49fd8ee10d195a;hb=65e0907798aa99df6b70b0cecd351033f834ea08;hp=03cf2062112bf8e2241a12429c23be05c33037a4;hpb=b27ee943c2a44a5437a5343d21a9d2be918a1279;p=platform%2Fupstream%2Fgstreamer.git diff --git a/plugins/elements/gstoutputselector.c b/plugins/elements/gstoutputselector.c index 03cf206..2b97b98 100644 --- a/plugins/elements/gstoutputselector.c +++ b/plugins/elements/gstoutputselector.c @@ -219,6 +219,12 @@ gst_output_selector_set_property (GObject * object, guint prop_id, GST_INFO_OBJECT (sel, "Activating pad %s:%s", GST_DEBUG_PAD_NAME (next_pad)); + /* guard against users setting a sink pad or foreign pad as active pad */ + if (next_pad != NULL) { + g_return_if_fail (GST_PAD_IS_SRC (next_pad)); + g_return_if_fail (GST_PAD_PARENT (next_pad) == GST_ELEMENT_CAST (sel)); + } + GST_OBJECT_LOCK (object); if (next_pad != sel->active_srcpad) { /* switch to new srcpad in next chain run */