outputselector: check for pending srcpad in _get_property()
authorTommi Myöhänen <ext-tommi.1.myohanen@nokia.com>
Fri, 31 Jul 2009 08:27:03 +0000 (11:27 +0300)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 31 Dec 2010 00:53:50 +0000 (00:53 +0000)
If there is a pending srcpad, return it instead of active srcpad
in gst_output_selector_get_property() function.

plugins/elements/gstoutputselector.c

index 15c0a72..f5c89ee 100644 (file)
@@ -238,7 +238,8 @@ gst_output_selector_get_property (GObject * object, guint prop_id,
   switch (prop_id) {
     case PROP_ACTIVE_PAD:
       GST_OBJECT_LOCK (object);
-      g_value_set_object (value, sel->active_srcpad);
+      g_value_set_object (value,
+          sel->pending_srcpad ? sel->pending_srcpad : sel->active_srcpad);
       GST_OBJECT_UNLOCK (object);
       break;
     case PROP_RESEND_LATEST:{