summaryrefslogtreecommitdiff
path: root/gst/sdp
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-10-05 17:04:10 +0200
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-10-05 17:21:22 +0200
commite0cb15cea0c07dc7d78f6c73114ccbfc5770ee72 (patch)
tree87a673d0b0f97077aa49ff31062e6ade79a2ba9e /gst/sdp
parent216887d599f0a5961d59cfc6c7eb12881b3831fd (diff)
sdpdemux: fix and reflow some exits
Diffstat (limited to 'gst/sdp')
-rw-r--r--gst/sdp/gstsdpdemux.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gst/sdp/gstsdpdemux.c b/gst/sdp/gstsdpdemux.c
index 1dc397353..4b2783216 100644
--- a/gst/sdp/gstsdpdemux.c
+++ b/gst/sdp/gstsdpdemux.c
@@ -1418,56 +1418,56 @@ gst_sdp_demux_start (GstSDPDemux * demux)
}
}
GST_SDP_STREAM_UNLOCK (demux);
+ gst_sdp_message_uninit (&sdp);
return TRUE;
/* ERRORS */
+done:
+ {
+ GST_SDP_STREAM_UNLOCK (demux);
+ gst_sdp_message_uninit (&sdp);
+ return FALSE;
+ }
transport_failed:
{
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
("Could not create RTP stream transport."));
- GST_SDP_STREAM_UNLOCK (demux);
- return FALSE;
+ goto done;
}
no_manager:
{
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
("Could not create RTP session manager."));
- GST_SDP_STREAM_UNLOCK (demux);
- return FALSE;
+ goto done;
}
could_not_parse:
{
- gst_sdp_message_uninit (&sdp);
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
("Could not parse SDP message."));
- GST_SDP_STREAM_UNLOCK (demux);
- return FALSE;
+ goto done;
}
no_streams:
{
- gst_sdp_message_uninit (&sdp);
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
("No streams in SDP message."));
- GST_SDP_STREAM_UNLOCK (demux);
- return FALSE;
+ goto done;
}
sent_redirect:
{
/* avoid hanging if redirect not handled */
- gst_sdp_message_uninit (&sdp);
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
("Sent RTSP redirect."));
- GST_SDP_STREAM_UNLOCK (demux);
- return FALSE;
+ goto done;
}
start_session_failure:
{
- GST_DEBUG_OBJECT (demux, "could not start session");
+ GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
+ ("Could not start RTP session manager."));
gst_element_set_state (demux->session, GST_STATE_NULL);
gst_bin_remove (GST_BIN_CAST (demux), demux->session);
demux->session = NULL;
- return FALSE;
+ goto done;
}
}