gst_rtspsrc_setup_streams (GstRTSPSrc * src, gboolean async)
{
GList *walk;
- GstRTSPResult res;
+ GstRTSPResult res = GST_RTSP_ERROR;
GstRTSPMessage request = { 0 };
GstRTSPMessage response = { 0 };
GstRTSPStream *stream = NULL;
src->next_port_num = src->client_port_range.min;
rtpport = rtcpport = 0;
+ if (G_UNLIKELY (src->streams == NULL))
+ goto no_streams;
+
for (walk = src->streams; walk; walk = g_list_next (walk)) {
GstRTSPConnection *conn;
gchar *transports;
("Could not connect to server, no protocols left"));
return GST_RTSP_ERROR;
}
+no_streams:
+ {
+ GST_ELEMENT_ERROR (src, RESOURCE, SETTINGS, (NULL),
+ ("SDP contains no streams"));
+ return GST_RTSP_ERROR;
+ }
create_request_failed:
{
gchar *str = gst_rtsp_strresult (res);