Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/rtmpproto.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 427655c27e..1b86c44f00 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -895,9 +895,10 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
fname = path + 10;
memcpy(rt->app, "ondemand", 9);
} else {
- char *p = strchr(path + 1, '/');
+ char *next = *path ? path + 1 : path;
+ char *p = strchr(next, '/');
if (!p) {
- fname = path + 1;
+ fname = next;
rt->app[0] = '\0';
} else {
char *c = strchr(p + 1, ':');