]> granicus.if.org Git - rtmpdump/commitdiff
Always use .flv extension for output
authorhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sun, 6 Jun 2010 07:17:29 +0000 (07:17 +0000)
committerhyc <hyc@400ebc74-4327-4243-bc38-086b20814532>
Sun, 6 Jun 2010 07:17:29 +0000 (07:17 +0000)
git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@509 400ebc74-4327-4243-bc38-086b20814532

rtmpsrv.c

index 01ac21450b264e090ecaffa0ca7904b79c742ad3..cd60e2f2d3d70bccaf58aa18ca6c65ab14a0a24b 100644 (file)
--- a/rtmpsrv.c
+++ b/rtmpsrv.c
@@ -687,9 +687,13 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int
          /* Add extension if none present */
          if (file[av.av_len - 4] != '.')
            {
-             strcpy(file+av.av_len, ".flv");
              av.av_len += 4;
            }
+         /* Always use flv extension, regardless of original */
+         if (strcmp(file+av.av_len-4, ".flv"))
+           {
+             strcpy(file+av.av_len-4, ".flv");
+           }
          argv[argc].av_val = ptr + 1;
          argv[argc++].av_len = 2;
          argv[argc].av_val = file;