aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
authorGravatar ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-29 21:46:51 +0000
committerGravatar ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-29 21:46:51 +0000
commitc223351501a0418a3e5e93848322425bbc54d426 (patch)
tree26f31df3d246305987c8463cdc38554d54c296f6 /libmpdemux
parent44e7b2fced69523325cd68bacbf7246d02d3be9a (diff)
be more tolerant on server responses parameters case (fix 1.17 from xine, see http://xine.cvs.sourceforge.net/xine/xine-lib/src/input/librtsp/rtsp.c?r1=1.16&r2=1.17)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18856 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/librtsp/rtsp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libmpdemux/librtsp/rtsp.c b/libmpdemux/librtsp/rtsp.c
index f938610cef..2ce4f16144 100644
--- a/libmpdemux/librtsp/rtsp.c
+++ b/libmpdemux/librtsp/rtsp.c
@@ -332,8 +332,8 @@ static int rtsp_get_answers(rtsp_t *s) {
if (!answer)
return 0;
- if (!strncmp(answer,"CSeq:",5)) {
- sscanf(answer,"CSeq: %u",&answer_seq);
+ if (!strncasecmp(answer,"CSeq:",5)) {
+ sscanf(answer,"%*s %u",&answer_seq);
if (s->cseq != answer_seq) {
#ifdef LOG
mp_msg(MSGT_OPEN, MSGL_WARN, "librtsp: warning: CSeq mismatch. got %u, assumed %u", answer_seq, s->cseq);
@@ -341,16 +341,16 @@ static int rtsp_get_answers(rtsp_t *s) {
s->cseq=answer_seq;
}
}
- if (!strncmp(answer,"Server:",7)) {
+ if (!strncasecmp(answer,"Server:",7)) {
char *buf = malloc(strlen(answer));
- sscanf(answer,"Server: %s",buf);
+ sscanf(answer,"%*s %s",buf);
if (s->server) free(s->server);
s->server=strdup(buf);
free(buf);
}
- if (!strncmp(answer,"Session:",8)) {
+ if (!strncasecmp(answer,"Session:",8)) {
char *buf = calloc(1, strlen(answer));
- sscanf(answer,"Session: %s",buf);
+ sscanf(answer,"%*s %s",buf);
if (s->session) {
if (strcmp(buf, s->session)) {
mp_msg(MSGT_OPEN, MSGL_WARN, "rtsp: warning: setting NEW session: %s\n", buf);
@@ -536,8 +536,8 @@ int rtsp_read_data(rtsp_t *s, char *buffer, unsigned int size) {
rest=rtsp_get(s);
if (!rest)
return -1;
- if (!strncmp(rest,"CSeq:",5))
- sscanf(rest,"CSeq: %u",&seq);
+ if (!strncasecmp(rest,"CSeq:",5))
+ sscanf(rest,"%*s %u",&seq);
} while (strlen(rest)!=0);
free(rest);
if (seq<0) {