diff --git a/ChangeLog b/ChangeLog index 822d3864cb..e2d6155e37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-06-27 Edward Hervey + + * 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 * gst/playback/gstdecodebin.c: (gst_decode_bin_class_init): diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index 28bf67b2ce..4aee286489 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -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