summaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-05-14 17:24:27 -0700
committerLuca Barbato <lu_zero@gentoo.org>2012-05-25 14:20:34 -0700
commitc6eeb9b7b6bbf5d0f507cad522ed5a4f929de14f (patch)
tree9bc35b1b227dea4f1827c9c26fdfa70e542b160d /libavformat/rtmpproto.c
parentb0970a69d11919b41c19a2901d4a7c2cf0b4ba2f (diff)
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.
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r--libavformat/rtmpproto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 9af4584226..807e899f34 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -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 {