summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-05-14 16:19:58 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-05-14 16:19:58 +0000
commit789ef04027fe1bc1cea3811104ddde44f4b3d50a (patch)
treed93bf36317c2f86627a0f9406bcbe47439d50b34
parent4333477d0c3e5a23da50c10c165c9c1ce1b3d57e (diff)
gst/rtsp/gstrtspsrc.c: When we try to execute a method that is not supported by the server, don't error out but remov...
Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_send): When we try to execute a method that is not supported by the server, don't error out but remove the method from the accepted methods so that we never try to perform this method again.
-rw-r--r--ChangeLog7
-rw-r--r--gst/rtsp/gstrtspsrc.c16
2 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e1acb17..e65740a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-05-14 Wim Taymans <wim@fluendo.com>
+ * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_send):
+ When we try to execute a method that is not supported by the server,
+ don't error out but remove the method from the accepted methods so that
+ we never try to perform this method again.
+
+2007-05-14 Wim Taymans <wim@fluendo.com>
+
* gst/rtp/gstrtpvorbisdepay.c: (gst_rtp_vorbis_depay_process):
Remove annoying _dump_mem.
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index e1e2aea6..88c606aa 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -2772,9 +2772,14 @@ gst_rtspsrc_send (GstRTSPSrc * src, RTSPMessage * request,
RTSPStatusCode int_code = RTSP_STS_OK;
RTSPResult res;
gboolean retry;
+ RTSPMethod method;
do {
retry = FALSE;
+
+ /* save method so we can disable it when the server complains */
+ method = request->type_data.request.method;
+
if ((res = gst_rtspsrc_try_send (src, request, response, &int_code)) < 0)
goto error;
@@ -2804,11 +2809,20 @@ error:
}
error_response:
{
+ res = RTSP_ERROR;
+
switch (response->type_data.response.code) {
case RTSP_STS_NOT_FOUND:
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL), ("%s",
response->type_data.response.reason));
break;
+ case RTSP_STS_NOT_ACCEPTABLE:
+ case RTSP_STS_NOT_IMPLEMENTED:
+ GST_WARNING_OBJECT (src, "got NOT IMPLEMENTED, disable method %s",
+ rtsp_method_as_text (method));
+ src->methods &= ~method;
+ res = RTSP_OK;
+ break;
default:
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
("Got error response: %d (%s).", response->type_data.response.code,
@@ -2817,7 +2831,7 @@ error_response:
}
/* we return FALSE so we should unset the response ourselves */
rtsp_message_unset (response);
- return RTSP_ERROR;
+ return res;
}
}