More state change function fixes.
authorTim-Philipp Müller <tim@centricular.net>
Thu, 23 Mar 2006 21:28:06 +0000 (21:28 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 23 Mar 2006 21:28:06 +0000 (21:28 +0000)
Original commit message from CVS:
* ext/speex/gstspeexdec.c: (speex_dec_change_state):
* gst/interleave/deinterleave.c: (deinterleave_change_state):
* gst/interleave/interleave.c: (interleave_change_state):
* gst/wavenc/gstwavenc.c: (gst_wavenc_change_state):
More state change function fixes.

ChangeLog
ext/speex/gstspeexdec.c
gst/wavenc/gstwavenc.c

index d6d0756..550784a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-03-23  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * ext/speex/gstspeexdec.c: (speex_dec_change_state):
+       * gst/interleave/deinterleave.c: (deinterleave_change_state):
+       * gst/interleave/interleave.c: (interleave_change_state):
+       * gst/wavenc/gstwavenc.c: (gst_wavenc_change_state):
+         More state change function fixes.
+
 2006-03-23  Wim Taymans  <wim@fluendo.com>
 
        * ext/esd/esdsink.c: (gst_esdsink_class_init),
index 035e8b7..da53dd9 100644 (file)
@@ -574,15 +574,22 @@ gst_speexdec_set_property (GObject * object, guint prop_id,
 static GstStateChangeReturn
 speex_dec_change_state (GstElement * element, GstStateChange transition)
 {
+  GstStateChangeReturn ret;
   GstSpeexDec *vd = GST_SPEEXDEC (element);
 
   switch (transition) {
     case GST_STATE_CHANGE_NULL_TO_READY:
-      break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
-      break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+    default:
       break;
+  }
+
+  ret = parent_class->change_state (element, transition);
+  if (ret != GST_STATE_CHANGE_SUCCESS)
+    return ret;
+
+  switch (transition) {
     case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
       break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
@@ -595,5 +602,5 @@ speex_dec_change_state (GstElement * element, GstStateChange transition)
       break;
   }
 
-  return parent_class->change_state (element, transition);
+  return ret;
 }
index f392b6e..6b2fb97 100644 (file)
@@ -126,8 +126,13 @@ gst_wavenc_get_type (void)
 static GstStateChangeReturn
 gst_wavenc_change_state (GstElement * element, GstStateChange transition)
 {
+  GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
   GstWavEnc *wavenc = GST_WAVENC (element);
 
+  ret = parent_class->change_state (element, transition);
+  if (ret != GST_STATE_CHANGE_SUCCESS)
+    return ret;
+
   switch (transition) {
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       wavenc->setup = FALSE;
@@ -137,11 +142,7 @@ gst_wavenc_change_state (GstElement * element, GstStateChange transition)
       break;
   }
 
-  if (parent_class->change_state) {
-    return parent_class->change_state (element, transition);
-  }
-
-  return GST_STATE_CHANGE_SUCCESS;
+  return ret;
 }
 
 static void