ext/theora/theoradec.c: re-arranged call to parent's state change in order to avoid locks (or worse).

Original commit message from CVS:
* ext/theora/theoradec.c: (theora_dec_change_state):
re-arranged call to parent's state change in order to avoid locks (or
worse).
This commit is contained in:
Edward Hervey 2005-06-27 13:11:29 +00:00
parent d3b7111a90
commit 6ec852f662
2 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2005-06-27 Edward Hervey <edward@fluendo.com>
* ext/theora/theoradec.c: (theora_dec_change_state):
re-arranged call to parent's state change in order to avoid locks (or
worse).
2005-06-26 Edward Hervey <edward@fluendo.com>
* gst/playback/gstdecodebin.c: (gst_decode_bin_class_init):

View file

@ -1034,8 +1034,12 @@ static GstElementStateReturn
theora_dec_change_state (GstElement * element)
{
GstTheoraDec *dec = GST_THEORA_DEC (element);
gint transition;
GstElementStateReturn ret;
switch (GST_STATE_TRANSITION (element)) {
transition = GST_STATE_TRANSITION (element);
switch (transition) {
case GST_STATE_NULL_TO_READY:
break;
case GST_STATE_READY_TO_PAUSED:
@ -1047,6 +1051,13 @@ theora_dec_change_state (GstElement * element)
break;
case GST_STATE_PAUSED_TO_PLAYING:
break;
default:
break;
}
ret = parent_class->change_state (element);
switch (transition) {
case GST_STATE_PLAYING_TO_PAUSED:
break;
case GST_STATE_PAUSED_TO_READY:
@ -1062,7 +1073,7 @@ theora_dec_change_state (GstElement * element)
break;
}
return parent_class->change_state (element);
return ret;
}
static void