[rtmpdump] [PATCH] Add quotes to -o value
Steven Penny
svnpenn at gmail.com
Sun May 20 20:39:06 CEST 2012
If the -o value from rtmpsrv contains an ampersand (&), it will be interpreted
as a command separator instead of part of the filename. This can be fixed by
using quotes with the value.
WRONG
-o sparams=id%2Citag%2Crtmpe%2Csource%2Cexpire&expire=1337537678.flv
RIGHT
-o "sparams=id%2Citag%2Crtmpe%2Csource%2Cexpire&expire=1337537678.flv"
I have seen this on YouTube.
---
rtmpsrv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/rtmpsrv.c b/rtmpsrv.c
index 9aa62f3..2ab80db 100644
--- a/rtmpsrv.c
+++ b/rtmpsrv.c
@@ -725,7 +725,7 @@ ServeInvoke(STREAMING_SERVER *server, RTMP * r, RTMPPacket *packet, unsigned int
argv[argc++].av_len = 2;
argv[argc].av_val = file;
argv[argc].av_len = av.av_len;
- ptr += sprintf(ptr, " -o %s", file);
+ ptr += sprintf(ptr, " -o \"%s\"", file);
now = RTMP_GetTime();
if (now - server->filetime < DUPTIME && AVMATCH(&argv[argc], &server->filename))
{
--
1.7.9
More information about the rtmpdump
mailing list