From: Wim Taymans Date: Mon, 29 Oct 2012 12:37:09 +0000 (+0000) Subject: sbc: dec: chain up to parent before downward state change X-Git-Tag: 1.19.3~507^2~13906^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9581e704b67747c0460490db0c230850910872cc;p=platform%2Fupstream%2Fgstreamer.git sbc: dec: chain up to parent before downward state change --- diff --git a/ext/sbc/gstsbcdec.c b/ext/sbc/gstsbcdec.c index 7f61a21a4d..fe29259ffb 100644 --- a/ext/sbc/gstsbcdec.c +++ b/ext/sbc/gstsbcdec.c @@ -135,6 +135,7 @@ done: static GstStateChangeReturn sbc_dec_change_state (GstElement * element, GstStateChange transition) { + GstStateChangeReturn result; GstSbcDec *dec = GST_SBC_DEC (element); switch (transition) { @@ -147,7 +148,13 @@ sbc_dec_change_state (GstElement * element, GstStateChange transition) sbc_init (&dec->sbc, 0); dec->outcaps = NULL; break; + default: + break; + } + result = parent_class->change_state (element, transition); + + switch (transition) { case GST_STATE_CHANGE_PAUSED_TO_READY: GST_DEBUG ("Finish subband codec"); if (dec->buffer) { @@ -165,7 +172,7 @@ sbc_dec_change_state (GstElement * element, GstStateChange transition) break; } - return parent_class->change_state (element, transition); + return result; } static void