diff options
author | Clément Bœsch <clement.boesch@smartjog.com> | 2012-11-14 10:36:23 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-11-14 10:09:51 +0100 |
commit | a9ba9268d7f7539621ddc94ef06b2f654d30a35e (patch) | |
tree | b1eeac6049381732992e77ab8e5543f40f97ba20 | |
parent | 66ff90f4a3d81c25feaa672dc8cc9cc88017753d (diff) | |
download | ffmpeg-a9ba9268d7f7539621ddc94ef06b2f654d30a35e.tar.gz |
ffserver: prefer av_asprintf over malloc+snprintf for Launch setting.
-rw-r--r-- | ffserver.c | 5 |
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); |