aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-02-16 16:37:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-02-18 19:52:36 +0100
commit003c32e72cb675b271d5434858899970000f369a (patch)
tree4c08892483f9cc70dd5452c11bb095c5f285348a
parentb2f893acc8826e290f401ee27bcb370293b7ef88 (diff)
downloadffmpeg-003c32e72cb675b271d5434858899970000f369a.tar.gz
ffserver: Try matching the RTSP url without a trailing slash
If the client sends PLAY/PAUSE requests with the same url as specified in Content-Base, these requests may have urls with trailing slashes. (cherry picked from commit c2ca851b234e169b50730ef357aeade8047491eb)
-rw-r--r--ffserver.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c
index 20ba890e4d..74bce851b9 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3199,7 +3199,7 @@ static HTTPContext *find_rtp_session_with_url(const char *url,
char path1[1024];
const char *path;
char buf[1024];
- int s;
+ int s, len;
rtp_c = find_rtp_session(session_id);
if (!rtp_c)
@@ -3219,6 +3219,10 @@ static HTTPContext *find_rtp_session_with_url(const char *url,
return rtp_c;
}
}
+ len = strlen(path);
+ if (len > 0 && path[len - 1] == '/' &&
+ !strncmp(path, rtp_c->stream->filename, len - 1))
+ return rtp_c;
return NULL;
}