playsink: undo state change side effect on error way out

... to avoid subsequent cleanup disposing an element not in NULL state.
This commit is contained in:
Mark Nauwelaerts 2011-02-23 14:29:03 +01:00
parent 948e4d50a6
commit 102b4feddf

View file

@ -1961,6 +1961,8 @@ setup_audio_chain (GstPlaySink * playsink, gboolean raw)
* re-generate the chain */
if (chain->volume == NULL) {
GST_DEBUG_OBJECT (playsink, "no existing volume element to re-use");
/* undo background state change done earlier */
gst_element_set_state (chain->sink, GST_STATE_NULL);
return FALSE;
}