summaryrefslogtreecommitdiffstats
path: root/gst/rtsp
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-02-22 09:56:03 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-02-22 09:56:03 +0000
commit7f0745bb7f26c69766bb0c64458c6543588cc4dc (patch)
tree63003c771256c054e1ac77532088f8c486115963 /gst/rtsp
parente63b9b56bf433dec2151841aa3dc169b094e092c (diff)
gst/rtsp/gstrtspsrc.c: Post the server response code in an error message instead of a generic 'error' message. Fixes ...
Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_setup_streams): Post the server response code in an error message instead of a generic 'error' message. Fixes #517237.
Diffstat (limited to 'gst/rtsp')
-rw-r--r--gst/rtsp/gstrtspsrc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 121cfdc0..d3811dea 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -3571,6 +3571,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
GstRTSPMessage response = { 0 };
GstRTSPStream *stream = NULL;
GstRTSPLowerTrans protocols;
+ GstRTSPStatusCode code;
/* we initially allow all configured lower transports. based on the URL
* transports and the replies from the server we narrow them down. */
@@ -3586,7 +3587,6 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
for (walk = src->streams; walk; walk = g_list_next (walk)) {
gchar *transports;
- GstRTSPStatusCode code;
stream = (GstRTSPStream *) walk->data;
@@ -3663,7 +3663,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
gst_rtspsrc_stream_free_udp (stream);
continue;
default:
- goto send_error;
+ goto response_error;
}
/* parse response transport */
@@ -3764,6 +3764,14 @@ setup_transport_failed:
("Could not setup transport."));
goto cleanup_error;
}
+response_error:
+ {
+ const gchar *str = gst_rtsp_status_as_text (code);
+
+ GST_ELEMENT_ERROR (src, RESOURCE, WRITE, (NULL),
+ ("Error (%d): %s", code, GST_STR_NULL (str)));
+ goto cleanup_error;
+ }
send_error:
{
gchar *str = gst_rtsp_strresult (res);