aboutsummaryrefslogtreecommitdiffstats
path: root/ffserver.c
diff options
context:
space:
mode:
authorClément Bœsch <clement.boesch@smartjog.com>2012-11-14 10:36:23 +0200
committerClément Bœsch <ubitux@gmail.com>2012-11-14 10:09:51 +0100
commita9ba9268d7f7539621ddc94ef06b2f654d30a35e (patch)
treeb1eeac6049381732992e77ab8e5543f40f97ba20 /ffserver.c
parent66ff90f4a3d81c25feaa672dc8cc9cc88017753d (diff)
downloadffmpeg-a9ba9268d7f7539621ddc94ef06b2f654d30a35e.tar.gz
ffserver: prefer av_asprintf over malloc+snprintf for Launch setting.
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ffserver.c b/ffserver.c
index d224b4165a..599f9be30b 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -4208,10 +4208,7 @@ static int parse_ffconfig(const char *filename)
feed->child_argv[i] = av_strdup(arg);
}
- feed->child_argv[i] = av_malloc(30 + strlen(feed->filename));
-
- snprintf(feed->child_argv[i], 30+strlen(feed->filename),
- "http://%s:%d/%s",
+ feed->child_argv[i] = av_asprintf("http://%s:%d/%s",
(my_http_addr.sin_addr.s_addr == INADDR_ANY) ? "127.0.0.1" :
inet_ntoa(my_http_addr.sin_addr),
ntohs(my_http_addr.sin_port), feed->filename);