[FFmpeg-cvslog] r19894 - trunk/libavformat/rtmpproto.c

kostya subversion
Thu Sep 17 07:31:02 CEST 2009


Author: kostya
Date: Thu Sep 17 07:31:02 2009
New Revision: 19894

Log:
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>)

Modified:
   trunk/libavformat/rtmpproto.c

Modified: trunk/libavformat/rtmpproto.c
==============================================================================
--- trunk/libavformat/rtmpproto.c	Thu Sep 17 07:24:42 2009	(r19893)
+++ trunk/libavformat/rtmpproto.c	Thu Sep 17 07:31:02 2009	(r19894)
@@ -611,8 +611,9 @@ static int rtmp_open(URLContext *s, cons
                 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, cons
                 }
             }
         }
-        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;



More information about the ffmpeg-cvslog mailing list