Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_change_state):
Handle state change failure more correctly.
+2005-09-19 Wim Taymans <wim@fluendo.com>
+
+ * gst/base/gstbasesrc.c: (gst_base_src_change_state):
+ Handle state change failure more correctly.
+
2005-09-19 Thomas Vander Stichele <thomas at apestaart dot org>
* check/Makefile.am:
if ((presult =
GST_ELEMENT_CLASS (parent_class)->change_state (element,
- transition)) != GST_STATE_CHANGE_SUCCESS) {
- gst_base_src_stop (basesrc);
- return presult;
- }
+ transition)) == GST_STATE_CHANGE_FAILURE)
+ goto failure;
switch (transition) {
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
}
return result;
+
+ /* ERRORS */
+failure:
+ {
+ gst_base_src_stop (basesrc);
+ return presult;
+ }
}
if ((presult =
GST_ELEMENT_CLASS (parent_class)->change_state (element,
- transition)) != GST_STATE_CHANGE_SUCCESS) {
- gst_base_src_stop (basesrc);
- return presult;
- }
+ transition)) == GST_STATE_CHANGE_FAILURE)
+ goto failure;
switch (transition) {
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
}
return result;
+
+ /* ERRORS */
+failure:
+ {
+ gst_base_src_stop (basesrc);
+ return presult;
+ }
}