]> granicus.if.org Git - rtmpdump/commitdiff
Zap colons in playpath
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sat, 2 Jan 2010 23:25:45 +0000 (23:25 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sat, 2 Jan 2010 23:25:45 +0000 (23:25 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@171 400ebc74-4327-4243-bc38-086b20814532

rtmpsuck.c

index 403ac595af9c4251efdf3c6dc7c4b8994133fb61..c7bc14f36f991300d6ce68954e2516d7f649ecc6 100644 (file)
@@ -313,15 +313,16 @@ ServeInvoke(STREAMING_SERVER *server, RTMPPacket *pack, const char *body)
       memcpy(file, server->rc.Link.playpath.av_val, server->rc.Link.playpath.av_len);
       file[server->rc.Link.playpath.av_len] = '\0';
       for (p=file; *p; p++)
-        if (*p == '/')
+        if (*p == '/' || *p == ':')
           *p = '_';
         else if (*p == '?')
           {
             *p = '\0';
             break;
           }
-      LogPrintf("Playpath: %.*s, writing to %s\n", server->rc.Link.playpath.av_len,
-        server->rc.Link.playpath.av_val, file);
+      LogPrintf("Playpath: %.*s\nSaving as: %s\n",
+        server->rc.Link.playpath.av_len, server->rc.Link.playpath.av_val,
+        file);
       server->out = fopen(file, "wb");
       if (!server->out)
         ret = 1;