ffserver: prefer av_asprintf over malloc+snprintf for Launch setting.

This commit is contained in:
Clément Bœsch 2012-11-14 10:36:23 +02:00 committed by Clément Bœsch
parent 66ff90f4a3
commit a9ba9268d7

View File

@ -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);