Commit c6eeb9b7 authored by Luca Barbato's avatar Luca Barbato

rtmp: fix url parsing

The application component can have a subcomponent to specify the
application instance even if it doesn't have a ":" in the playpath.
parent b0970a69
......@@ -164,7 +164,7 @@ content across a TCP/IP network.
The required syntax is:
@example
rtmp://@var{server}[:@var{port}][/@var{app}][/@var{playpath}]
rtmp://@var{server}[:@var{port}][/@var{app}][/@var{instance}][/@var{playpath}]
@end example
The accepted parameters are:
......
......@@ -1037,9 +1037,10 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
fname = next;
rt->app[0] = '\0';
} else {
// make sure we do not mismatch a playpath for an application instance
char *c = strchr(p + 1, ':');
fname = strchr(p + 1, '/');
if (!fname || c < fname) {
if (!fname || (c && c < fname)) {
fname = p + 1;
av_strlcpy(rt->app, path + 1, p - path);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment