diff options
author | Lars Täuber <lars.taeuber@gmx.net> | 2009-09-17 09:31:02 +0400 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-09-17 09:31:02 +0400 |
commit | f68c8a50391802c0fca81e09de48df557f528c25 (patch) | |
tree | 19c82b4a9453f0f5c9a1753d851ec5ffedb39cc8 /libavformat/rtmpproto.c | |
parent | 609782970c2e84ef748959aace8865ac213ba65b (diff) |
Do not include "mp4:" prefix from RTMP URL into "app" path or second time
into playpath.
Patch by Lars Täuber
(<$name> . <$lastname with umlaut replaced with diphtong> @ <gmx> . <net>)
Originally committed as revision 19894 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 470e6fef87..55bd99033d 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -611,8 +611,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) fname = path + 1; app[0] = '\0'; } else { + char *c = strchr(p + 1, ':'); fname = strchr(p + 1, '/'); - if (!fname) { + if (!fname || c < fname) { fname = p + 1; av_strlcpy(app, path + 1, p - path); } else { @@ -621,8 +622,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags) } } } - if (!strcmp(fname + strlen(fname) - 4, ".f4v") || - !strcmp(fname + strlen(fname) - 4, ".mp4")) { + if (!strchr(fname, ':') && + (!strcmp(fname + strlen(fname) - 4, ".f4v") || + !strcmp(fname + strlen(fname) - 4, ".mp4"))) { memcpy(rt->playpath, "mp4:", 5); } else { rt->playpath[0] = 0; |