]> git.sesse.net Git - ffmpeg/commitdiff
move logfile setup right after config parsing
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Wed, 25 Jun 2008 18:51:54 +0000 (18:51 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Wed, 25 Jun 2008 18:51:54 +0000 (18:51 +0000)
Originally committed as revision 13974 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index 59a0b99b32fc2f6a9a50e70c47b61129c344241f..c449a7f2fdf288d8e06e9f8427af881a83df8dc0 100644 (file)
@@ -4480,6 +4480,15 @@ int main(int argc, char **argv)
         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_feed_streams();
@@ -4514,15 +4523,6 @@ int main(int argc, char **argv)
     /* signal init */
     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)
         chdir("/");