[PATCH] Look for a fourth slash when splitting the url into app+playpath
From: Björn Axelsson <bjorn.axelsson@intinor.se> --- librtmp/parseurl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/librtmp/parseurl.c b/librtmp/parseurl.c index 0183958..646c70c 100644 --- a/librtmp/parseurl.c +++ b/librtmp/parseurl.c @@ -137,12 +137,14 @@ parsehost: * application = app[/appinstance] */ - char *slash2, *slash3 = NULL; + char *slash2, *slash3 = NULL, *slash4 = NULL; int applen, appnamelen; slash2 = strchr(p, '/'); if(slash2) slash3 = strchr(slash2+1, '/'); + if(slash3) + slash4 = strchr(slash3+1, '/'); applen = end-p; /* ondemand, pass all parameters as app */ appnamelen = applen; /* ondemand length */ @@ -156,7 +158,9 @@ parsehost: appnamelen = 8; } else { /* app!=ondemand, so app is app[/appinstance] */ - if(slash3) + if(slash4) + appnamelen = slash4-p; + else if(slash3) appnamelen = slash3-p; else if(slash2) appnamelen = slash2-p; -- 1.7.9.4
On Tue, Oct 30, 2012 at 12:31 PM, Martin Storsjo wrote:
librtmp/parseurl.c | 8 ++++++--
I saw this commit originally on your GitHub repo. Can you give some more information, such as an example page this would be applicable to, or an example RTMP URL?
On Tue, 30 Oct 2012, Steven Penny wrote:
On Tue, Oct 30, 2012 at 12:31 PM, Martin Storsjo wrote:
librtmp/parseurl.c | 8 ++++++--
I saw this commit originally on your GitHub repo. Can you give some more information, such as an example page this would be applicable to, or an example RTMP URL?
It was necessary for streaming to limelight servers, iirc - it was part of the limelight branch at least (it's been a little while since I tested that). // Martin
participants (2)
-
Martin Storsjo -
Steven Penny