[FFmpeg-devel] [PATCH] -h message to stdout

Nicolas George nicolas.george
Tue May 8 14:02:33 CEST 2007

Le nonidi 19 flor?al, an CCXV, Michel Bardiaux a ?crit?:
> I would put the call to av_log_set_callback at the top of show_help(), 
> so that it would be clear the same log protocol applies for the entire 
> function.

In fact, I hesitated between this and putting all calls to av_* together as
I did. Here is the new version.


  Nicolas George

Index: ffmpeg.c
--- ffmpeg.c	(revision 8929)
+++ ffmpeg.c	(working copy)
@@ -3718,8 +3718,18 @@
+ * 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);
     printf("usage: ffmpeg [[infile options] -i infile]... {[outfile options] outfile}...\n"
            "Hyper fast Audio and Video encoder\n");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070508/2a35450a/attachment.pgp>

More information about the ffmpeg-devel mailing list