summaryrefslogtreecommitdiffstats
path: root/ext/pulse/pulsemixer.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-09-08 19:34:09 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-09-08 19:34:09 +0200
commitca7bec0d650327afa67fa5ffefe973565b252b3e (patch)
tree57b6439b49d5e7c52262245afd413f3cc8b12a19 /ext/pulse/pulsemixer.c
parentfe2d8bdc64da24ce2a702bf32c1a68e8b32aef58 (diff)
pulse: small cleanups
Add some debug info Fix the state changes
Diffstat (limited to 'ext/pulse/pulsemixer.c')
-rw-r--r--ext/pulse/pulsemixer.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/pulse/pulsemixer.c b/ext/pulse/pulsemixer.c
index 99d33aee..ab99c552 100644
--- a/ext/pulse/pulsemixer.c
+++ b/ext/pulse/pulsemixer.c
@@ -252,6 +252,7 @@ static GstStateChangeReturn
gst_pulsemixer_change_state (GstElement * element, GstStateChange transition)
{
GstPulseMixer *this = GST_PULSEMIXER (element);
+ GstStateChangeReturn res;
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
@@ -260,19 +261,22 @@ gst_pulsemixer_change_state (GstElement * element, GstStateChange transition)
gst_pulsemixer_ctrl_new (G_OBJECT (this), this->server,
this->device, GST_PULSEMIXER_UNKNOWN);
break;
+ default:
+ ;
+ }
+
+ res = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+ switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
if (this->mixer) {
gst_pulsemixer_ctrl_free (this->mixer);
this->mixer = NULL;
}
break;
-
default:
;
}
- if (GST_ELEMENT_CLASS (parent_class)->change_state)
- return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
-
- return GST_STATE_CHANGE_SUCCESS;
+ return res;
}