Also swap the args in the callback function
authorWim Taymans <wim.taymans@gmail.com>
Tue, 11 Dec 2001 16:42:09 +0000 (16:42 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 11 Dec 2001 16:42:09 +0000 (16:42 +0000)
Original commit message from CVS:
Also swap the args in the callback function

gst/gstbin.c

index 5bfa479..42a3f96 100644 (file)
@@ -45,8 +45,8 @@ static GstElementStateReturn  gst_bin_change_state_norecurse  (GstBin *bin);
 static gboolean                        gst_bin_change_state_type       (GstBin *bin,
                                                                 GstElementState state,
                                                                 GType type);
-static void                    gst_bin_child_state_change      (GstBin *bin, GstElementState old, 
-                                                                GstElementState new, GstElement *child);
+static void                    gst_bin_child_state_change      (GstElement *child, GstElementState old, 
+                                                                GstElementState new, GstBin *bin);
 
 static gboolean                        gst_bin_iterate_func            (GstBin *bin);
 
@@ -358,7 +358,7 @@ gst_bin_remove (GstBin *bin,
 }
 
 static void
-gst_bin_child_state_change (GstBin *bin, GstElementState old, GstElementState new, GstElement *child)
+gst_bin_child_state_change (GstElement *child, GstElementState old, GstElementState new, GstBin *bin)
 {
   gint old_idx = 0, new_idx = 0, i;
 
@@ -384,11 +384,6 @@ gst_bin_child_state_change (GstBin *bin, GstElementState old, GstElementState ne
       break;
     }
   }
-  // FIXME, need to setup this array at add/remove time
-  if (i<0) {
-    GST_STATE_PENDING (bin) = GST_STATE_NULL;
-    gst_bin_change_state_norecurse (bin);
-  }
          
   GST_UNLOCK (bin);
 }