From 1a40681f537b3f2808a1d0946d6b0525971919fc Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 10 Aug 2010 11:19:22 +0200 Subject: [PATCH] playsink: set READY sinks to NULL before freeing chain upon failure --- gst/playback/gstplaysink.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 8075677..0caa031 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -1333,6 +1333,8 @@ link_failed: { GST_ELEMENT_ERROR (playsink, CORE, PAD, (NULL), ("Failed to configure the video sink.")); + /* checking sink made it READY */ + gst_element_set_state (chain->sink, GST_STATE_NULL); free_chain ((GstPlayChain *) chain); return NULL; } @@ -1826,6 +1828,8 @@ link_failed: { GST_ELEMENT_ERROR (playsink, CORE, PAD, (NULL), ("Failed to configure the audio sink.")); + /* checking sink made it READY */ + gst_element_set_state (chain->sink, GST_STATE_NULL); free_chain ((GstPlayChain *) chain); return NULL; } @@ -2040,6 +2044,8 @@ link_failed: { GST_ELEMENT_ERROR (playsink, CORE, PAD, (NULL), ("Failed to configure the visualisation element.")); + /* element made it to READY */ + gst_element_set_state (chain->vis, GST_STATE_NULL); free_chain ((GstPlayChain *) chain); return NULL; } -- 2.7.4