diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-01-31 15:39:52 +0100 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-02-28 17:59:52 +0100 |
commit | c2a73ef5f648eae8b6eec6021dfc8aed271928e0 (patch) | |
tree | 6bb7d93a0821a91e405aef3fd2e3a073ece05458 | |
parent | 394b4e08e9dab2954f2070dadb2729785391f829 (diff) |
gnloperation: Cleanup pads when going from PAUSED to READY
-rw-r--r-- | gnl/gnloperation.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gnl/gnloperation.c b/gnl/gnloperation.c index d52a0d1..be89c94 100644 --- a/gnl/gnloperation.c +++ b/gnl/gnloperation.c @@ -78,6 +78,7 @@ static void gnl_operation_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static gboolean gnl_operation_prepare (GnlObject * object); +static gboolean gnl_operation_cleanup (GnlObject * object); static gboolean gnl_operation_add_element (GstBin * bin, GstElement * element); static gboolean gnl_operation_remove_element (GstBin * bin, @@ -153,6 +154,7 @@ gnl_operation_class_init (GnlOperationClass * klass) GST_DEBUG_FUNCPTR (gnl_operation_remove_element); gnlobject_class->prepare = GST_DEBUG_FUNCPTR (gnl_operation_prepare); + gnlobject_class->cleanup = GST_DEBUG_FUNCPTR (gnl_operation_cleanup); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&gnl_operation_src_template)); @@ -728,6 +730,20 @@ gnl_operation_prepare (GnlObject * object) return TRUE; } +static gboolean +gnl_operation_cleanup (GnlObject * object) +{ + GnlOperation *oper = (GnlOperation *) object; + + if (oper->dynamicsinks) { + GST_DEBUG ("Resetting dynamic sinks"); + gnl_operation_set_sinks (oper, 0); + } + + return TRUE; +} + + static GstPad * gnl_operation_request_new_pad (GstElement * element, GstPadTemplate * templ, const gchar * name) |