[FFmpeg-cvslog] r26190 - in trunk/libavformat: rtsp.c rtsp.h

mstorsjo subversion
Sun Jan 2 11:07:56 CET 2011


Author: mstorsjo
Date: Sun Jan  2 11:07:56 2011
New Revision: 26190

Log:
rtsp: Pass RTSPState to ff_rtsp_parse_line, instead of HTTPAuthState

This allows ff_rtsp_parse_line to do more changes directly in RTSPState
when parsing the reply, instead of having to store large amounts of
temporary data in RTSPMessageHeader.

Modified:
   trunk/libavformat/rtsp.c
   trunk/libavformat/rtsp.h

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Sun Jan  2 11:06:21 2011	(r26189)
+++ trunk/libavformat/rtsp.c	Sun Jan  2 11:07:56 2011	(r26190)
@@ -685,7 +685,7 @@ static void rtsp_parse_transport(RTSPMes
 }
 
 void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf,
-                        HTTPAuthState *auth_state)
+                        RTSPState *rt)
 {
     const char *p;
 
@@ -718,12 +718,12 @@ void ff_rtsp_parse_line(RTSPMessageHeade
     } else if (av_stristart(p, "Location:", &p)) {
         p += strspn(p, SPACE_CHARS);
         av_strlcpy(reply->location, p , sizeof(reply->location));
-    } else if (av_stristart(p, "WWW-Authenticate:", &p) && auth_state) {
+    } else if (av_stristart(p, "WWW-Authenticate:", &p) && rt) {
         p += strspn(p, SPACE_CHARS);
-        ff_http_auth_handle_header(auth_state, "WWW-Authenticate", p);
-    } else if (av_stristart(p, "Authentication-Info:", &p) && auth_state) {
+        ff_http_auth_handle_header(&rt->auth_state, "WWW-Authenticate", p);
+    } else if (av_stristart(p, "Authentication-Info:", &p) && rt) {
         p += strspn(p, SPACE_CHARS);
-        ff_http_auth_handle_header(auth_state, "Authentication-Info", p);
+        ff_http_auth_handle_header(&rt->auth_state, "Authentication-Info", p);
     } else if (av_stristart(p, "Content-Base:", &p)) {
         p += strspn(p, SPACE_CHARS);
         av_strlcpy(reply->content_base, p , sizeof(reply->content_base));
@@ -808,7 +808,7 @@ int ff_rtsp_read_reply(AVFormatContext *
             reply->status_code = atoi(buf1);
             av_strlcpy(reply->reason, p, sizeof(reply->reason));
         } else {
-            ff_rtsp_parse_line(reply, p, &rt->auth_state);
+            ff_rtsp_parse_line(reply, p, rt);
             av_strlcat(rt->last_reply, p,    sizeof(rt->last_reply));
             av_strlcat(rt->last_reply, "\n", sizeof(rt->last_reply));
         }

Modified: trunk/libavformat/rtsp.h
==============================================================================
--- trunk/libavformat/rtsp.h	Sun Jan  2 11:06:21 2011	(r26189)
+++ trunk/libavformat/rtsp.h	Sun Jan  2 11:07:56 2011	(r26190)
@@ -353,7 +353,7 @@ typedef struct RTSPStream {
 } RTSPStream;
 
 void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf,
-                        HTTPAuthState *auth_state);
+                        RTSPState *rt);
 
 extern int rtsp_rtp_port_min;
 extern int rtsp_rtp_port_max;



More information about the ffmpeg-cvslog mailing list