gst/base/gstbasesrc.c: Handle state change failure more correctly.

Original commit message from CVS:
* gst/base/gstbasesrc.c: (gst_base_src_change_state):
Handle state change failure more correctly.
This commit is contained in:
Wim Taymans 2005-09-19 14:55:26 +00:00
parent 1b8f44e409
commit 74d0352327
3 changed files with 23 additions and 8 deletions

View file

@ -1,3 +1,8 @@
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:

View file

@ -1077,10 +1077,8 @@ gst_base_src_change_state (GstElement * element, GstStateChange transition)
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:
@ -1102,4 +1100,11 @@ gst_base_src_change_state (GstElement * element, GstStateChange transition)
}
return result;
/* ERRORS */
failure:
{
gst_base_src_stop (basesrc);
return presult;
}
}

View file

@ -1077,10 +1077,8 @@ gst_base_src_change_state (GstElement * element, GstStateChange transition)
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:
@ -1102,4 +1100,11 @@ gst_base_src_change_state (GstElement * element, GstStateChange transition)
}
return result;
/* ERRORS */
failure:
{
gst_base_src_stop (basesrc);
return presult;
}
}