changeset 6253:7069d6fdedaa libavformat

Report when a method gets an error status code That makes easier understand what went wrong. In debug mode the whole reply gets printed.
author lu_zero
date Mon, 12 Jul 2010 10:17:20 +0000
parents deebd9ec774e
children feec446a2dc1
files rtsp.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rtsp.c	Sun Jul 11 14:56:32 2010 +0000
+++ b/rtsp.c	Mon Jul 12 10:17:20 2010 +0000
@@ -959,6 +959,13 @@
         rt->auth_state.auth_type != HTTP_AUTH_NONE)
         goto retry;
 
+    if (reply->status_code > 400){
+        av_log(s, AV_LOG_ERROR, "method %s failed, %d\n",
+               method,
+               reply->status_code);
+        av_log(s, AV_LOG_DEBUG, "%s\n", rt->last_reply);
+    }
+
     return 0;
 }