[FFmpeg-cvslog] r8947 - trunk/ffmpeg.c

benoit subversion
Wed May 9 10:17:35 CEST 2007


Author: benoit
Date: Wed May  9 10:17:35 2007
New Revision: 8947

Log:

create a log callback and set it in help function
patch by Nicolas George \ nicolas george normalesup org /



Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Wed May  9 10:17:35 2007
@@ -3718,8 +3718,18 @@ static void show_license(void)
     exit(1);
 }
 
+/**
+ * Trivial log callback.
+ * Only suitable for show_help and similar since it lacks prefix handling.
+ */
+static void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
+{
+    vfprintf(stdout, fmt, vl);
+}
+
 static void show_help(void)
 {
+    av_log_set_callback(log_callback_help);
     show_banner();
     printf("usage: ffmpeg [[infile options] -i infile]... {[outfile options] outfile}...\n"
            "Hyper fast Audio and Video encoder\n");




More information about the ffmpeg-cvslog mailing list