From 77223c5388ca7bfea2232afeb05b05fcc536de6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 2 Jan 2011 10:10:12 +0000 Subject: [PATCH] rtsp: Pass the method name to ff_rtsp_parse_line Originally committed as revision 26191 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffserver.c | 2 +- libavformat/rtsp.c | 4 ++-- libavformat/rtsp.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ffserver.c b/ffserver.c index fcc3359a41..64bcb9beb9 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2895,7 +2895,7 @@ static int rtsp_parse_request(HTTPContext *c) len = sizeof(line) - 1; memcpy(line, p, len); line[len] = '\0'; - ff_rtsp_parse_line(header, line, NULL); + ff_rtsp_parse_line(header, line, NULL, NULL); p = p1 + 1; } diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index bc7e4e1b22..4ba5cefbfb 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -685,7 +685,7 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) } void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf, - RTSPState *rt) + RTSPState *rt, const char *method) { const char *p; @@ -808,7 +808,7 @@ int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, reply->status_code = atoi(buf1); av_strlcpy(reply->reason, p, sizeof(reply->reason)); } else { - ff_rtsp_parse_line(reply, p, rt); + ff_rtsp_parse_line(reply, p, rt, method); av_strlcat(rt->last_reply, p, sizeof(rt->last_reply)); av_strlcat(rt->last_reply, "\n", sizeof(rt->last_reply)); } diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h index fbe9e1a689..2680297c29 100644 --- a/libavformat/rtsp.h +++ b/libavformat/rtsp.h @@ -353,7 +353,7 @@ typedef struct RTSPStream { } RTSPStream; void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf, - RTSPState *rt); + RTSPState *rt, const char *method); extern int rtsp_rtp_port_min; extern int rtsp_rtp_port_max;