move logfile setup right after config parsing
Originally committed as revision 13974 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f0754ad822
commit
f10d55ed88
18
ffserver.c
18
ffserver.c
@ -4480,6 +4480,15 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* open log file if needed */
|
||||||
|
if (logfilename[0] != '\0') {
|
||||||
|
if (!strcmp(logfilename, "-"))
|
||||||
|
logfile = stderr;
|
||||||
|
else
|
||||||
|
logfile = fopen(logfilename, "a");
|
||||||
|
av_log_set_callback(http_av_log);
|
||||||
|
}
|
||||||
|
|
||||||
build_file_streams();
|
build_file_streams();
|
||||||
|
|
||||||
build_feed_streams();
|
build_feed_streams();
|
||||||
@ -4514,15 +4523,6 @@ int main(int argc, char **argv)
|
|||||||
/* signal init */
|
/* signal init */
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
/* open log file if needed */
|
|
||||||
if (logfilename[0] != '\0') {
|
|
||||||
if (!strcmp(logfilename, "-"))
|
|
||||||
logfile = stderr;
|
|
||||||
else
|
|
||||||
logfile = fopen(logfilename, "a");
|
|
||||||
av_log_set_callback(http_av_log);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ffserver_daemon)
|
if (ffserver_daemon)
|
||||||
chdir("/");
|
chdir("/");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user