playbin2: Fix segfault on notify after group change.
authorMichael Smith <msmith@songbirdnest.com>
Wed, 11 Feb 2009 01:16:07 +0000 (17:16 -0800)
committerMichael Smith <msmith@songbirdnest.com>
Wed, 11 Feb 2009 01:20:12 +0000 (17:20 -0800)
If our group has been switched, then we get a selector active-pad
notification, we don't need to notify.

gst/playback/gstplaybin2.c

index 1eb7501..b86b03d 100644 (file)
@@ -1627,6 +1627,12 @@ selector_active_pad_changed (GObject * selector, GParamSpec * pspec,
     }
   }
 
+  /* We got a pad-change after our group got switched out; no need to notify */
+  if (!select) {
+    GST_PLAY_BIN_UNLOCK (playbin);
+    return;
+  }
+
   switch (select->type) {
     case GST_PLAY_SINK_TYPE_VIDEO:
     case GST_PLAY_SINK_TYPE_VIDEO_RAW: