Make ffserver use cmdutils.c show_license function
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Wed, 22 Aug 2007 13:10:25 +0000 (13:10 +0000)
committerBenoit Fouet <benoit.fouet@free.fr>
Wed, 22 Aug 2007 13:10:25 +0000 (13:10 +0000)
patch by Stefano Sabatini: [stefano sabatini minus lala ! poste it]

Originally committed as revision 10183 to svn://svn.ffmpeg.org/ffmpeg/trunk

Makefile
ffserver.c

index 2fd677d..56cca08 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -81,8 +81,8 @@ endif
 ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs
        $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(EXTRALIBS)
 
-ffserver$(EXESUF): ffserver.o .libs
-       $(CC) $(LDFLAGS) $(FFSERVERLDFLAGS) -o $@ ffserver.o $(EXTRALIBS)
+ffserver$(EXESUF): ffserver.o cmdutils.o .libs
+       $(CC) $(LDFLAGS) $(FFSERVERLDFLAGS) -o $@ ffserver.o cmdutils.o $(EXTRALIBS)
 
 ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs
        $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(EXTRALIBS) $(SDL_LIBS)
index 8731f90..dce934e 100644 (file)
@@ -49,6 +49,7 @@
 #include "ffserver.h"
 #include "random.h"
 #include "avstring.h"
+#include "cmdutils.h"
 
 #undef exit
 
@@ -4318,26 +4319,6 @@ static void show_help(void)
            );
 }
 
-static void show_license(void)
-{
-    show_banner();
-    printf(
-    "FFmpeg is free software; you can redistribute it and/or\n"
-    "modify it under the terms of the GNU Lesser General Public\n"
-    "License as published by the Free Software Foundation; either\n"
-    "version 2.1 of the License, or (at your option) any later version.\n"
-    "\n"
-    "FFmpeg is distributed in the hope that it will be useful,\n"
-    "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-    "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
-    "Lesser General Public License for more details.\n"
-    "\n"
-    "You should have received a copy of the GNU Lesser General Public\n"
-    "License along with FFmpeg; if not, write to the Free Software\n"
-    "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n"
-    );
-}
-
 static void handle_child_exit(int sig)
 {
     pid_t pid;
@@ -4383,6 +4364,7 @@ int main(int argc, char **argv)
             break;
         switch(c) {
         case 'L':
+            show_banner();
             show_license();
             exit(0);
         case '?':