mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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.
This commit is contained in:
parent
b0970a69d1
commit
c6eeb9b7b6
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user