summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--gst/rtsp/gstrtspsrc.c22
2 files changed, 25 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d8c39df..d66cfad7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-09-16 Wim Taymans <wim.taymans@gmail.com>
+ * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_setup_streams),
+ (gst_rtspsrc_dup_printf):
+ Give meaningfull error when all streams failed to configure for some
+ reason.
+
+2007-09-16 Wim Taymans <wim.taymans@gmail.com>
+
* gst/rtp/README:
Update README with the design for synchronisation rules of RTP on
sender and receiver.
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 689aa203..e0ca5361 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -3384,6 +3384,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
/* reset some state */
src->free_channel = 0;
src->interleaved = FALSE;
+ src->need_activate = FALSE;
for (walk = src->streams; walk; walk = g_list_next (walk)) {
gchar *transports;
@@ -3478,8 +3479,10 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
goto no_transport;
/* parse transport, go to next stream on parse error */
- if (gst_rtsp_transport_parse (resptrans, &transport) != GST_RTSP_OK)
- continue;
+ if (gst_rtsp_transport_parse (resptrans, &transport) != GST_RTSP_OK) {
+ GST_WARNING_OBJECT (src, "failed to parse transport %s", resptrans);
+ goto next;
+ }
/* update allowed transports for other streams. once the transport of
* one stream has been determined, we make sure that all other streams
@@ -3518,8 +3521,12 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
GST_DEBUG_OBJECT (src,
"could not configure stream %p transport, skipping stream",
stream);
+ goto next;
}
}
+ /* we need to activate at least one streams when we detect activity */
+ src->need_activate = TRUE;
+ next:
/* clean up our transport struct */
gst_rtsp_transport_init (&transport);
}
@@ -3527,8 +3534,9 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
gst_rtsp_ext_list_stream_select (src->extensions, src->url);
- /* we need to activate the streams when we detect activity */
- src->need_activate = TRUE;
+ /* if there is nothing to activate, error out */
+ if (!src->need_activate)
+ goto nothing_to_activate;
return TRUE;
@@ -3570,6 +3578,12 @@ no_transport:
("Server did not select transport."));
goto cleanup_error;
}
+nothing_to_activate:
+ {
+ GST_ELEMENT_ERROR (src, STREAM, FORMAT, (NULL),
+ ("No supported stream was found."));
+ return FALSE;
+ }
cleanup_error:
{
gst_rtsp_message_unset (&request);