+2004-10-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
+ * gst/playback/gstplaybasebin.c: (setup_source),
+ (gst_play_base_bin_change_state):
+ Actually clean up streaminfo if output fails. This would trigger
+ if, for example, there was no CD in the drive. No preroll, so
+ a streaminfo structure is created, but the subsequent state change
+ of the thread fails.
+ * gst/playback/gstplaybin.c: (gst_play_bin_change_state):
+ Don't change state if parent failed.
+
2004-10-08 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybin.c: (gst_play_bin_class_init),
gst_bin_remove (GST_BIN (play_base_bin->thread), old_src);
}
gst_bin_add (GST_BIN (play_base_bin->thread), play_base_bin->source);
+ if (gst_bin_sync_children_state (GST_BIN (play_base_bin->thread)) ==
+ GST_STATE_FAILURE) {
+ return FALSE;
+ }
}
/* now see if the source element emits raw audio/video all by itself,
* because one stream was unrecognized. */
g_signal_connect (play_base_bin->thread, "error",
G_CALLBACK (gst_play_base_bin_error), play_base_bin);
+ } else {
+ /* in case of no preroll, we might have streaminfo already... */
+ g_list_foreach (play_base_bin->streaminfo,
+ (GFunc) g_object_unref, NULL);
+ g_list_free (play_base_bin->streaminfo);
+ play_base_bin->streaminfo = NULL;
}
break;
}
transition = GST_STATE_TRANSITION (element);
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element);
+ if (ret == GST_STATE_FAILURE)
+ return ret;
switch (transition) {
case GST_STATE_NULL_TO_READY: